orm-django
The power of Django ORM for use in standalone scripts.
Install
pip install orm-django
Define Django settings
By default the ORM settings will use DJANGO_SETTINGS_MODULE from environment variable. If not found we will fallback to settings module.
Minimum settings configuration
You should at least configure your INSTALLED_APPS in settings to be able to use its models:
INSTALLED_APPS = [
'app_1',
...
'app_n',
]
And the database:
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.mysql',
'NAME': DB_NAME,
'USER': DB_USER,
'PASSWORD': DB_PASSWORD,
'HOST': DB_HOST
},
}
To use, just import it at the first line of your script file:
import orm
and you will be able to import and use all models form your apps.
Tested using Python > 3.7 and Django >= 4.0
Metadata
Release files for orm-django 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 | |
|---|---|---|---|
| orm_django-0.0.4.tar.gz | 2.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| orm_django-0.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 5.3 kB
Release files / orm_django-0.0.4.tar.gz
| Download URL | orm_django-0.0.4.tar.gz |
|---|---|
| Size | 2.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c3849ee407762e60e97b82d537cd085553d40153d84f167f58bea5ab8522a045
|
|
BLAKE2b-256 checksum How to use checksums |
a442229a1e739ea655f80e3bf80da7a57de8317e8a7592530cc843e0fad40b0c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.0
|
Release files / orm_django-0.0.4-py3-none-any.whl
| Download URL | orm_django-0.0.4-py3-none-any.whl |
|---|---|
| Size | 2.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
212e9c54bb179f6e6a5d2575efac5fd05c73e107ec8cc2144b06131cf4165008
|
|
BLAKE2b-256 checksum How to use checksums |
ae4c9cfa70ef0b258bea69758fc5ef746ebf9a729b64410be38440c3071f2486
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.0
|