django-apitokens
Generate tokens compatible with Django Restframework (drf) from your Django Admin view:
- Create new tokens at will (after being generated, they no longer can be reversed, since only a digest is stored in the database).
- Add expirity dates (supports time and date)
- Remove tokens when you no longer need them.
My Token view
Add token view
Install
- Install the python package:
pip install django-apitokens - Add
apitokensto your Django installed apps:
# In your settings.py
INSTALLED_APPS = [
...
'apitokens',
]
- Ensure you are using
knoxTokenAuthenticationclass:
# In your settings.py
REST_FRAMEWORK = {
...,
'DEFAULT_AUTHENTICATION_CLASSES': (
'knox.auth.TokenAuthentication',
...,
),
...,
}
- You are set to use tokens generated through this app as a way to login with the DRF framework.
Contributing
To contribute code to this app, ensure you're following the community guidelines
Metadata
Release files for django-apitokens 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| django_apitokens-0.0.4.tar.gz | 10.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| django_apitokens-0.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.3 kB
Release files / django_apitokens-0.0.4.tar.gz
| Download URL | django_apitokens-0.0.4.tar.gz |
|---|---|
| Size | 10.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
06ab23c0211888b2d9c2f1be4ccdf882b1b903b95665307031a21709082ae079
|
|
BLAKE2b-256 checksum How to use checksums |
a7a03fa901ed3274d67cab2fcb3835f8bdbd58f543a6a73fd6c3cdc941b9cb23
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|
Release files / django_apitokens-0.0.4-py3-none-any.whl
| Download URL | django_apitokens-0.0.4-py3-none-any.whl |
|---|---|
| Size | 6.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
9ee67dc2e8487d44e2f6b2f9af181d21a3509e49d401163d5bacaaf17f770d93
|
|
BLAKE2b-256 checksum How to use checksums |
72472201fc7aba9e00ee82ed2f7a809e4e718f6905e683b969d3bef37ba13cab
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.14.5
|