Welcome, guest | Sign In | My Account | Store | Cart

Notice! PyPM is being replaced with the ActiveState Platform, which enhances PyPM’s build and deploy capabilities. Create your free Platform account to download ActivePython or customize Python with the packages you require and get automatic updates.

Download
ActivePython
INSTALL>
pypm install importd

How to install importd

  1. Download and install ActivePython
  2. Open Command Prompt
  3. Type pypm install importd
 Python 2.7Python 3.2Python 3.3
Windows (32-bit)
Windows (64-bit)
Mac OS X (10.5+)
Linux (32-bit)
0.2.3 Available View build log
0.1.4 Available View build log
0.1.0 Failed View build log
Linux (64-bit)
0.2.3 Available View build log
0.1.4 Available View build log
0.1.0 Failed View build log
 
Author
License
BSD
Depended by
Imports
Lastest release
version 0.2.3 on Aug 21st, 2013

What is it?

Django is awesome, but starting a new project in it is a pain. importd is inspired from ruby's sinatra. Hello world django project:

System Message: ERROR/3 (<string>, line 7)

Unknown directive type "code-block".

.. code-block:: python

    from importd import d
    d(DEBUG=True)

    @d("/")
    def idx(request):
        return "index.html"

    @d("/post/<int:post_id>/")
    def post(request, post_id):
        return "post.html", {"post_id": post_id}

    if __name__ == "__main__":
        d.main()

To run it:

System Message: ERROR/3 (<string>, line 25)

Unknown directive type "code".

.. code::

  $ python foo.py

This will start the debug server.

To run it in production:

System Message: ERROR/3 (<string>, line 33)

Unknown directive type "code".

.. code::

  $ gunicorn foo:d

Some examples: https://github.com/amitu/importd/tree/master/examples

Backward Incompatibility Change

d.main() used to be not required, now it is.

Features

  • fully compatible with django
  • supports smarturls
  • most of regularly used django functions and classes available in d. namespace, eg d.HttpResponse, d.render_to_response, d.get_object_or_404 etc
  • automatically maps "templates" folder in foo.py directory to serve templates
  • automatically maps "static" folder in foo.py to serve static content
  • management commands still available: $ python foo.py shell
  • wsgi compliant
  • gunicorn support
  • works seamlessly with fhurl (http://packages.python.org/fhurl/)

Installation

System Message: ERROR/3 (<string>, line 61)

Unknown directive type "code".

.. code::

 $ pip install importd

Contributors

LICENSE

  • BSD

Subscribe to package updates

Last updated Aug 21st, 2013

Download Stats

Last month:1

What does the lock icon mean?

Builds marked with a lock icon are only available via PyPM to users with a current ActivePython Business Edition subscription.

Need custom builds or support?

ActivePython Enterprise Edition guarantees priority access to technical support, indemnification, expert consulting and quality-assured language builds.

Plan on re-distributing ActivePython?

Get re-distribution rights and eliminate legal risks with ActivePython OEM Edition.