Skip to main content
This is a pre-production deployment of Warehouse. Changes made here affect the production instance of PyPI (pypi.python.org).
Help us improve Python packaging - Donate today!

Django Lookup Dict is a django app that enables you use a django model the Python dict way

Project Description

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:

  1. Add ‘django_lookup_dict’ to INSTALLED_APPS in your django project’s settings.
  2. Run ‘python manage.py syncdb’ in order to create the data storage for the model.
Release History

Release History

This version
History Node

0.1

Download Files

Download Files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

File Name & Checksum SHA256 Checksum Help Version File Type Upload Date
django_lookup_dict-0.1.tar.gz (2.0 kB) Copy SHA256 Checksum SHA256 Source Aug 29, 2014

Supported By

WebFaction WebFaction Technical Writing Elastic Elastic Search Pingdom Pingdom Monitoring Dyn Dyn DNS Sentry Sentry Error Logging CloudAMQP CloudAMQP RabbitMQ Heroku Heroku PaaS Kabu Creative Kabu Creative UX & Design Fastly Fastly CDN DigiCert DigiCert EV Certificate Rackspace Rackspace Cloud Servers DreamHost DreamHost Log Hosting