{ "info": { "author": "Martin Gaitan", "author_email": "gaitan@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Web Environment", "Framework :: Django", "Framework :: IPython", "License :: OSI Approved :: BSD License", "Operating System :: OS Independent", "Programming Language :: Python", "Topic :: Database", "Topic :: Scientific/Engineering :: Information Analysis" ], "description": "=================\nDjango ORM Magic\n=================\n\n.. image:: https://pypip.in/v/django-orm-magic/badge.png\n :target: https://pypi.python.org/pypi/django-orm-magic\n :alt: Latest PyPI version\n\n.. image:: https://pypip.in/d/django-orm-magic/badge.png\n :target: https://pypi.python.org/pypi/django-orm-magic\n :alt: Number of PyPI downloads\n\n\n:author: Mart\u00edn Gait\u00e1n \n:homepage: https://github.com/mgaitan/django-orm-magic\n:documentation: see `this notebook`__\n\n__ documentation_\n.. _documentation: http://nbviewer.ipython.org/urls/raw.github.com/mgaitan/django-orm-magic/master/documentation.ipynb\n\n\nDefine your django models in an IPython cell and use them on the fly.\nLet the magic do the boring part.\n\nDjango ORM isn't conceived to be used standalone. Even for a trivial case, you need to configure a database, create an app, etc. This magic handle that automatically, and then import every model to your interactive session.\n\n\nInstall\n=======\n\nYou can install or upgrade via pip\n\n pip install -U django-orm-magic\n\nor directly from the repository using the `%install_ext` magic command::\n\n In[1]: %install_ext https://raw.github.com/mgaitan/django-orm-magic/master/django_orm_magic.py\n\n\nBasic usage\n===========\n\nOnce it's installed, you can load it with ``%load_ext django_orm_magic``. Then define your models in a cell started with the cell magic ``%%django_orm``.\nFor example::\n\n In[2]: %load_ext django_orm_magic\n\n\n In[3]: %%django_orm\n\n from django.db import models\n\n class Poll(models.Model):\n question = models.CharField(max_length=200)\n pub_date = models.DateTimeField('date published')\n\n class Choice(models.Model):\n poll = models.ForeignKey(Poll)\n choice_text = models.CharField(max_length=200)\n votes = models.IntegerField(default=0)\n\n\nAnd it's done. Every model is synced in a sqlite database named ``db.sqlite`` in your current path and imported automatically::\n\n\n In[4]: Poll.objects.all()\n Out[4]: []\n\n In[5]: from django.utils import timezone\n p = Poll(question=\"What's new?\", pub_date=timezone.now())\n p.save()\n\n\nSee the documentation_ for further details.\n\nSee here_ for another example\n\n.. _here: http://nbviewer.ipython.org/gist/mgaitan/7224431#modelando-resultados.gob.ar-en-una-base-de-datos\n\n\n\nChangelog\n=========\n\n0.3.1 / 2014-01-21\n------------------\n\n- Fix bug `#4 `_\n (now install via pip works)\n\n\n0.3 / 2013-12-14\n----------------\n\n- Added `%django_settings` magic\n- Added a tutorial notebook\n\n0.2 / 2013-12-11\n-----------------\n\n- Moved the code to github.\n- Packaged and registered in PyPi\n\n\n0.1 / 2013-10-29\n-------------------\n\n- First public release (as a gist_)\n\n.. _gist: https://gist.github.com/mgaitan/7207448", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/mgaitan/django-orm-magic", "keywords": "ipython notebook django orm standalone", "license": "BSD", "maintainer": null, "maintainer_email": null, "name": "django-orm-magic", "package_url": "https://pypi.org/project/django-orm-magic/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django-orm-magic/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/mgaitan/django-orm-magic" }, "release_url": "https://pypi.org/project/django-orm-magic/0.4/", "requires_dist": null, "requires_python": null, "summary": "An extension for IPython that help to define django's models in your interactive session.", "version": "0.4" }, "last_serial": 1608328, "releases": { "0.2": [ { "comment_text": "", "digests": { "md5": "34d30df5564a86125d42e26fc3c6713a", "sha256": "9e70cbcc0559fece653bccd3a6012736177b82338fcf56a6867bd6c33871b0b7" }, "downloads": -1, "filename": "django-orm-magic-0.2.tar.gz", "has_sig": false, "md5_digest": "34d30df5564a86125d42e26fc3c6713a", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3400, "upload_time": "2013-12-11T22:58:54", "url": "https://files.pythonhosted.org/packages/72/ea/e2e2b83766213f864b62b9cb86e9e9f3d6bdd3762365a093d1b284f20ea6/django-orm-magic-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "5bbb4cb1d24e1285bcf8e9664af405b8", "sha256": "c477063de09ac5244729a3c36acb7ac618f52541e7a7d46bb0d194337a624bee" }, "downloads": -1, "filename": "django-orm-magic-0.3.tar.gz", "has_sig": false, "md5_digest": "5bbb4cb1d24e1285bcf8e9664af405b8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3868, "upload_time": "2013-12-14T16:15:58", "url": "https://files.pythonhosted.org/packages/60/0a/84081d790b939ee14191a9d96c14ac893889e521dbfc34cccdf297050854/django-orm-magic-0.3.tar.gz" } ], "0.3.1": [ { "comment_text": "", "digests": { "md5": "3135d618af30441c82f1ee1b6f01803e", "sha256": "fd6f90c007552b6e96bf6324f4420654f23b3872b3e1a5bbd81640992b3fca82" }, "downloads": -1, "filename": "django-orm-magic-0.3.1.tar.gz", "has_sig": false, "md5_digest": "3135d618af30441c82f1ee1b6f01803e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4111, "upload_time": "2014-01-21T19:51:50", "url": "https://files.pythonhosted.org/packages/b2/bc/6edee81e7920078681c44295d3d8d09a05dd9fa72acd03c78c8576469e35/django-orm-magic-0.3.1.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "56f312f996df55c261569077dc740072", "sha256": "fe83fc51fd5673b7a8070fd1a96f1f516ee4ac86b5e45723ad9856ec19576161" }, "downloads": -1, "filename": "django-orm-magic-0.4.tar.gz", "has_sig": false, "md5_digest": "56f312f996df55c261569077dc740072", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3818, "upload_time": "2015-06-26T18:51:12", "url": "https://files.pythonhosted.org/packages/e3/68/27afcabaeee2c022bb88fcc58becb8afa8ae90f325cc7bfa3aeb24ba901a/django-orm-magic-0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "56f312f996df55c261569077dc740072", "sha256": "fe83fc51fd5673b7a8070fd1a96f1f516ee4ac86b5e45723ad9856ec19576161" }, "downloads": -1, "filename": "django-orm-magic-0.4.tar.gz", "has_sig": false, "md5_digest": "56f312f996df55c261569077dc740072", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3818, "upload_time": "2015-06-26T18:51:12", "url": "https://files.pythonhosted.org/packages/e3/68/27afcabaeee2c022bb88fcc58becb8afa8ae90f325cc7bfa3aeb24ba901a/django-orm-magic-0.4.tar.gz" } ] }