Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/tswicegood/ns.py
Namespaces done right
https://github.com/tswicegood/ns.py
Last synced: 12 days ago
JSON representation
Namespaces done right
- Host: GitHub
- URL: https://github.com/tswicegood/ns.py
- Owner: tswicegood
- License: apache-2.0
- Created: 2011-05-12T06:14:29.000Z (over 13 years ago)
- Default Branch: master
- Last Pushed: 2011-05-12T06:40:40.000Z (over 13 years ago)
- Last Synced: 2024-09-24T02:50:00.302Z (about 2 months ago)
- Language: Python
- Homepage:
- Size: 81.1 KB
- Stars: 4
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
ns.py
=====
Declaring namespaces in one Python fileEver feel that having a requirement on ``pkg_resources`` just so you can do
sane namespaces in Python is a little much? If so, this package is for you.
It aims to be a simple, one-file replacement for that single function and all
of the craziness it adds... warning:: This isn't production ready yet. It's got tests, and those tests
have been run on exactly two platforms. Not what you'd call
battle-tested. *But* if you're interested in making a viable
alternative to ``pkg_resources`` for Python, please fork this
project and help.Usage
-----
It's simple. You import ``declare``, and call it.::
from ns import declare
declare(__name__)Acknowledgements
----------------
``pkg_resources`` provided the jumping off point for this code. Without it,
I'd probably still be scratching my head over recursively walking the module
path.`Peter Wang`_ convinced me over beer that we should try to do this.
Contributing
------------* Create something awesome -- make the code better, add some functionality,
whatever (this is the hardest part).
* `Fork it`_
* Create a topic branch to house your changes
* Get all of your commits in the new topic branch
* Submit a `pull request`_.. _pull request: http://help.github.com/pull-requests/
.. _Fork it: http://help.github.com/forking/
.. _Peter Wang: http://blog.streamitive.com/