{ "info": { "author": "Owen Nelson", "author_email": "onelson@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Environment :: Web Environment", "Framework :: Django", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Internet :: WWW/HTTP", "Topic :: Internet :: WWW/HTTP :: Dynamic Content", "Topic :: Internet :: WWW/HTTP :: WSGI", "Topic :: Software Development :: Libraries :: Application Frameworks", "Topic :: Software Development :: Libraries :: Python Modules" ], "description": ".. -*- restructuredtext -*-\n\ndjango-ipyfield\n===============\n\n``ipyfield`` provides a model field for \n`django `_\nthat allows the storage of an ip address as a \"pretend\" ``PositiveBigInt``\n(currently ``varchar(39)`` until I can figure out how to get an unsigned 64bit\ninteger column across all supported DBs)\non the db side by using `IPy `_ to handle\nconversion to an ``IPy.IP`` instance (or ``None``) on the python side. \n\nWut?\n----\n\nIn its way, it gives us a way to store both **ipv4** and **ipv6** consistently\nwithout having to throw them in long charfields. Also, it gives us an easy way\nto validate data as it comes in, while giving us access to additional meta\ninformation (basically everything that makes \n`IPy `_ so awesome).\n\n\nInstallation\n------------\n\nAdd this to your django project by installing with ``pip``: ::\n \n pip install django-ipyfield\n\nor with ``easy_install``: ::\n\n easy_install django-ipyfield\n\n\n\nUsage\n-----\n\nIn your models, do something like the following: ::\n \n from django.db import models\n from ipyfield.models import IPyField\n\n class MyModel(models.Model):\n\n # the regular params should work well enough here\n ipaddr = IPyField()\n # ... and so on\n\n\nFrom here, any assignments to ``obj.ipaddr`` can be considered a constructor\nargument to a new ``IPy.IP`` instance. Anything ``IP()`` can use to make a new\nobject can be used.\n\nWhen making queries, I added one extra piece of syntactical sugar. For \n``__in`` (range) lookups, you can pass a **CIDR** notation address range, for \nexample: ::\n \n MyModel.objects.filter(ipaddr__in='10.0.0.0/24')\n\nCurrently you need to use this form of notation supported for this kind of \nquery. For now, if you need to use a ``prefix-netmask`` style notation, pass it \nto ``IPy.IP`` yourself and use the resulting instance as your filter parameter.\n\n\nTODOs\n-----\n\n* figure out how to build an appropriately sized integer field across all DBs.\n\nChangelog\n---------\n\n0.1.6\n Added support for ``gt``, ``gte``, ``lt``, and ``lte`` lookups.\n0.1.5\n Added south support.\n\n0.1.4\n IPy.IP instance raises exception when compared to a non-IP instance. This\n becomes an issue when you get into ModelForm validation (didn't come up when\n only using the ORM) with regards to empty/null values. Fixed by subclassing\n (wrapping) IPy.IP.\n0.1.3\n Basic field functionality in place.", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://bitbucket.org/onelson/django-ipyfield/", "keywords": "ip,models,django", "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "django-ipyfield", "package_url": "https://pypi.org/project/django-ipyfield/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-ipyfield/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://bitbucket.org/onelson/django-ipyfield/" }, "release_url": "https://pypi.org/project/django-ipyfield/0.1.6/", "requires_dist": null, "requires_python": null, "summary": "IPy.IP instances with BigInt storage for django models", "version": "0.1.6" }, "last_serial": 640475, "releases": { "0.1": [], "0.1.1": [], "0.1.2": [ { "comment_text": "", "digests": { "md5": "730ce4b42b3d8cc375845c073b92f3f6", "sha256": "495aa00fafe343c1166db2a7d735ef42d9028613994cf208684c2f0a1fff975d" }, "downloads": -1, "filename": "django-ipyfield-0.1.2.tar.gz", "has_sig": false, "md5_digest": "730ce4b42b3d8cc375845c073b92f3f6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4039, "upload_time": "2011-06-24T03:45:11", "url": "https://files.pythonhosted.org/packages/63/3a/862643053724d3162b5a8625b883a7bcb2c587e65ea8b436af7c45fb0e8b/django-ipyfield-0.1.2.tar.gz" } ], "0.1.3": [ { "comment_text": "", "digests": { "md5": "e6ac13de307af87352c12b9715f4a904", "sha256": "2151a2a9d297ef1f20d2f62f8e80853d37e3127aaabd4849f28327756cff3e14" }, "downloads": -1, "filename": "django-ipyfield-0.1.3.tar.gz", "has_sig": false, "md5_digest": "e6ac13de307af87352c12b9715f4a904", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4273, "upload_time": "2011-09-01T18:00:43", "url": "https://files.pythonhosted.org/packages/23/97/0c873f1eb59726df8ffe01320e834f9044cfbf903e92692074024ad67aa4/django-ipyfield-0.1.3.tar.gz" } ], "0.1.4": [ { "comment_text": "", "digests": { "md5": "221ad231b3854f13268cd621474e9e1a", "sha256": "51fe0e52d7fb15e2c1b7395f00fd24dc2d9970a224f31cfbee60b8940bb2be15" }, "downloads": -1, "filename": "django-ipyfield-0.1.4.tar.gz", "has_sig": false, "md5_digest": "221ad231b3854f13268cd621474e9e1a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4774, "upload_time": "2011-09-07T16:33:01", "url": "https://files.pythonhosted.org/packages/12/0b/38529056800e20f6218c3cbf9f6d7f04995549cda35ab8fbde8911595442/django-ipyfield-0.1.4.tar.gz" } ], "0.1.6": [ { "comment_text": "", "digests": { "md5": "ae74ed19c394cac8b95f748e6154f2e8", "sha256": "121af3767774a81d7fa87cb11869c81d15711c827fd412c3fe7f4d84a4e023f1" }, "downloads": -1, "filename": "django-ipyfield-0.1.6.tar.gz", "has_sig": false, "md5_digest": "ae74ed19c394cac8b95f748e6154f2e8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5046, "upload_time": "2012-02-11T21:33:54", "url": "https://files.pythonhosted.org/packages/b7/32/322130f1500f13b661ef900b9dacd3266eeb990a32be57f421443ae1fd50/django-ipyfield-0.1.6.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "ae74ed19c394cac8b95f748e6154f2e8", "sha256": "121af3767774a81d7fa87cb11869c81d15711c827fd412c3fe7f4d84a4e023f1" }, "downloads": -1, "filename": "django-ipyfield-0.1.6.tar.gz", "has_sig": false, "md5_digest": "ae74ed19c394cac8b95f748e6154f2e8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5046, "upload_time": "2012-02-11T21:33:54", "url": "https://files.pythonhosted.org/packages/b7/32/322130f1500f13b661ef900b9dacd3266eeb990a32be57f421443ae1fd50/django-ipyfield-0.1.6.tar.gz" } ] }