Uscalt-DRF
Uscalt-DRF is a library for Django-Rest-Framework backend servers to allow you to control the data retrieval process rather than Uscalt.
To install using pip:
pip install uscalt-django
Quick start
- Add "uscalt-drf" to your INSTALLED_APPS setting:
INSTALLED_APPS = [
...
'uscalt-drf.apps.UscaltDRFConfig',
]
- Include the uscalt-drf URLconf in your project urls.py:
path('', include('uscalt-drf.urls')),
-
Run
python manage.py migrate. -
We need to send the key to the user to decrypt the file and to do this we use email. You'll need to set these variables in settings:
EMAIL_HOST = 'smtp.XXXX.com'
EMAIL_PORT = 587
EMAIL_HOST_USER = 'EMAIL@HOST.com'
EMAIL_HOST_PASSWORD = 'XXXXXX'
EMAIL_USE_TLS = True
EMAIL_USE_SSL = False
Don't worry, this is a standard library. We have not created our own email sending code or handle your details.
Allowing users to upload data
Allowing users to upload data is straightforward. In fact, so long as you set your email, Uscalt takes care of the rest!
Creating a dataset from data stored on a database
This is for links that were created using the 'Use data from cloud database (not local devices)' option. This will require you to define how to retrieve the data from a given list of user identifiers.
You'll need to create a file called uscalt.py in every app that contains data needed by a Room Link. Instantiate a class and define each data retrieval function with the uscalt_task decorator. (The name of the class is not important)
from uscalt_drf.utils import uscalt_task
from .models import running_model
class Uscalt:
@uscalt_task
def Running(identifiers):
data = running_model.objects.filter(pk__in=identifiers)
return data
Metadata
Release files for uscalt-drf 0.1.1.3
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 |
|---|---|---|---|---|
| uscalt_drf-0.1.1.3.tar.gz | 8.0 kB | Without provenance | Details for uscalt_drf-0.1.1.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| uscalt_drf-0.1.1.3-py3-none-any.whl | Python 3 | none | any | Details for uscalt_drf-0.1.1.3-py3-none-any.whl |
Total release size: 17.0 kB
Release files / uscalt_drf-0.1.1.3.tar.gz
| Download URL | uscalt_drf-0.1.1.3.tar.gz |
|---|---|
| Size | 8.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
637fd9d37f2533045175543dd475621a6c7dcb5c7b17f7a530d477d9c6000992
|
|
BLAKE2b-256 checksum How to use checksums |
44f3caf1eb1f3b188351044d11f5da35e8a91e2a8d94d6860f8d38c7ebd0767b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.8
|
Release files / uscalt_drf-0.1.1.3-py3-none-any.whl
| Download URL | uscalt_drf-0.1.1.3-py3-none-any.whl |
|---|---|
| Size | 9.0 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
4c95041300dc761b07d630884e939dbc5f420cf898f831eb63de3afbd2388a92
|
|
BLAKE2b-256 checksum How to use checksums |
7822efa7e188ea7876b36cf4388cd0f8db3de846322d34725a3a51f16ce49d0d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.7.1 importlib_metadata/4.10.0 pkginfo/1.8.2 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.3 CPython/3.9.8
|
Security for uscalt-drf 0.1.1.3
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.