ariadne-django-ext
Installation • Contributing • License
Custom, simple Django User model with email as username
Installation
pip install ariadne-django-ext
Usage
cache
cache decorator will cache a result returned from resolver using Django cache framework. You can it accepts same keyword arguments and passed down to Django cache.
Cache key must be either value or callable. Callable will receive same arguments as resolver then return cache key. Callable may return None to bypass the cache.
It uses typename and key from info.path as cache key prefix.
from ariadne_django_ext import cache
@cache(key='cache_key')
def resolver(parent, info):
...
return 'result'
wrap_result
wrap_result decorator wraps return value of a resolver into dictionary with the key
from ariadne_django_ext import wrap_result
@wrap_result(key='result')
def resolver(parent, info):
return 'result'
Above example will return following dict
{ "result": "result" }
isAuthenticated & isStaff directive
A resolver will receive an authenticated user as keyword argument.
directive @isAuthenticated on FIELD_DEFINITION
type User {
id: ID
username: String
ipAddress: String @isAuthenticated
}
from ariadne_django_ext import IsAuthenticatedDirective
schema = make_executable_schema(
type_defs,
resolvers,
directives={"isAuthenticated": IsAuthenticatedDirective}
)
Contributing
Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.
Please make sure to update tests as appropriate.
License
Metadata
Release files for ariadne-django-ext 1.6
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| ariadne-django-ext-1.6.tar.gz | 4.8 kB | Without provenance | Details for ariadne-django-ext-1.6.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| ariadne_django_ext-1.6-py3-none-any.whl | Python 3 | none | any | Details for ariadne_django_ext-1.6-py3-none-any.whl |
Total release size: 12.3 kB
Release files / ariadne-django-ext-1.6.tar.gz
| Download URL | ariadne-django-ext-1.6.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
69bcd32493e281ff47d568b0991052c7b88c7636582b700975703fdfdd28c040
|
|
BLAKE2b-256 checksum How to use checksums |
d1b0a89d1f40d9c669cb6242c29d673d7cb83e16ce17b704ab4bba4b257dee92
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.11 CPython/3.9.7 Linux/5.8.0-1042-azure
|
Release files / ariadne_django_ext-1.6-py3-none-any.whl
| Download URL | ariadne_django_ext-1.6-py3-none-any.whl |
|---|---|
| Size | 7.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
bf87ab46512f7b52f1cd95a4278d04e46462334b033783d033b223c9de48a962
|
|
BLAKE2b-256 checksum How to use checksums |
70aed31af24fd6227c8d90c20d9bc3106643bec10276e6686215ec9d648e08e5
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.11 CPython/3.9.7 Linux/5.8.0-1042-azure
|
Security for ariadne-django-ext 1.6
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.