A package for using Django ORM standalone in scripts
Project description
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
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file orm_django-0.0.4.tar.gz.
File metadata
- Download URL: orm_django-0.0.4.tar.gz
- Upload date:
- Size: 2.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c3849ee407762e60e97b82d537cd085553d40153d84f167f58bea5ab8522a045
|
|
| MD5 |
5d66c40417830f4950b8d4a893cdc0b8
|
|
| BLAKE2b-256 |
a442229a1e739ea655f80e3bf80da7a57de8317e8a7592530cc843e0fad40b0c
|
File details
Details for the file orm_django-0.0.4-py3-none-any.whl.
File metadata
- Download URL: orm_django-0.0.4-py3-none-any.whl
- Upload date:
- Size: 2.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.11.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
212e9c54bb179f6e6a5d2575efac5fd05c73e107ec8cc2144b06131cf4165008
|
|
| MD5 |
5d778bd38ae90dea142d775da8b63b38
|
|
| BLAKE2b-256 |
ae4c9cfa70ef0b258bea69758fc5ef746ebf9a729b64410be38440c3071f2486
|