You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -12,7 +13,8 @@ Live version of this project @ [https://pygy.co](https://pygy.co)
12
13
13
14
Check link stats by adding **+** to the URL. Example [pygy.co/pygmy+](https://pygy.co/pygmy+)
14
15
15
-
*Note that pygy.co is a demo website for this project and should be used as such. While the website is going to be up for the foreseeable future, its future depends on the sponsorship and hosting that I get. Currently, the project is hosted on Digitalocean, as they were kind enough to offer me one year of sponsorship. I would like to keep the project website up and maintain the project but I do not make any money out of this project or website.
16
+
*Note that pygy.co is a demo website for this project and should be used as such. While the website is going to be up for the foreseeable future, its future depends on the sponsorship and hosting that I get. Currently, the project is hosted on Digitalocean, as they were kind enough to offer me one year of sponsorship. I would like to keep the project website up and maintain the project but I do not make any financial gains out of this project or website. Website is
17
+
free to use and is completely ad-free.
16
18
If you would like to support the project, Please use the donate link in [Donations](#donations) section.*
17
19
18
20
# Table of Contents
@@ -29,7 +31,7 @@ If you would like to support the project, Please use the donate link in [Donatio
29
31
-[Use SQLite](#use-sqlite)
30
32
-[Docker](#docker-1)
31
33
-[Using Pygmy API](#using-pygmy-api)
32
-
-[## Create User:](#create-user)
34
+
-[Create User:](#create-user)
33
35
-[Shell Usage](#shell-usage)
34
36
- [How Link Stats Are Generated?](#how-link-stats-are-generated)
In [5]: # check the available context of the shell
253
254
In [6]: pygmy_context
254
255
255
256
In [7]: # Create custom short URL
@@ -274,7 +275,7 @@ For getting geo location stats from IP maxminds' [GeoLite2-Country.mmd](http://p
274
275
275
276
###### How Pygmy Auth Token Works?
276
277
277
-
It uses JWT. When user logs in using username and password two tokens are generated, refresh token and auth token. Auth token is used for authentication with the Pygmy API. Refresh token can only be used to generate new auth token. Auth token has a very short TTL but refresh token has a longer TTL. After 30 minutes. When a request comes with the old auth token and a new token is generated from the refresh token API. User passwords are encrypted by [bcrypt](https://en.wikipedia.org/wiki/Bcrypt) hash algorithm.
278
+
It uses JWT. When user logs in using username and password two tokens are generated, refresh token and auth token. Auth token is used for authentication with the Pygmy API. The refresh token can only be used to generate a new auth token. Auth token has a very short TTL but refresh token has a longer TTL. After 30 minutes. When a request comes with the old auth token and a new token is generated from the refresh token API. User passwords are encrypted by [bcrypt](https://en.wikipedia.org/wiki/Bcrypt) hash algorithm.
278
279
279
280
## Development
280
281
@@ -287,9 +288,13 @@ To contribute to the project:
287
288
3. Test the changer by running: `docker run -it -p 8000:8000 pygmy`
288
289
4. The website will be available at http://127.0.0.1:8000/
289
290
290
-
Run tests and generate a coverage report:
291
+
Run tests:
291
292
292
-
`coverage run --source pygmy -m py.test`
293
+
In root directory run this command: `py.test`
294
+
295
+
Or with coverage report(`pip install coverage`):
296
+
297
+
`coverage run --omit="*/templates*,*/venv*,*/tests*" -m py.test`
293
298
294
299
See coverage report(Coverage is bad because the coverage for integration tests is not generated yet):
0 commit comments