A django app that allows you to use a djanog model created by the app with a python dict-like operators. Useful for storing configuration variables
Hello, world
Simple Demo:
from django_lookup_dict import LookupDict
lookup = LookupDict()
lookup['hello'] = 'world'
print "Lookup for Hello is : {0}".format(lookup['hello'])
How To:
Setting a value, regular assigningment with the square bracket operator [ ]:
lookup['hello'] = 'world'
Retrieving a value, using square bracket operator [ ]:
lookup['hello']
Key count:
len(lookup)
Deletin, using the del and using square bracket operators:
del lookup['hello']
Deleting certain keys:
# lookup.delete(*args)
lookup.delete('key1', 'key2', 'key3')
Installation
Automatic installation:
pip install django_lookup_dict
Manual installation: Download the latest source from GitHub.
tar xvzf django_lookup_dict-[VERSION].tar.gz cd django_lookup_dict-[VERSION] python setup.py build sudo python setup.py install
After Instalation:
Add ‘django_lookup_dict’ to INSTALLED_APPS in your django project’s settings.
Run ‘python manage.py syncdb’ in order to create the data storage for the model.
Metadata
Release files for django_lookup_dict 0.1
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 |
|---|---|---|---|---|
| django_lookup_dict-0.1.tar.gz | 2.0 kB | Without provenance | Details for django_lookup_dict-0.1.tar.gz |
Release files / django_lookup_dict-0.1.tar.gz
| Download URL | django_lookup_dict-0.1.tar.gz |
|---|---|
| Size | 2.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d49eeabca0cda214df96f6ad5553f74b5d82f53e351f2a6268352a27011fb9fe
|
|
BLAKE2b-256 checksum How to use checksums |
694eb2e13f3ea402de7cd2f0ac8faa450ed20f19f69c3d11168ba42b2bf0ee7b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for django_lookup_dict 0.1
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.