A Python package methods decorator (not joke)
Project description
import export
A Python package methods decorator
Once upon a time, not very long time ago, about last Friday...
OHWAI let me show here tldr
- install
pip install import-export
- use
"""mypack.py"""
import export
def fee():
print 'twee'
@export
def moo():
print 'moow'
> from mypack import *
> print(fee())
NameError: name 'fee' is not defined
> print(moo())
moow
How it work
- Eeh... just adding a decorated resource name to the dictionary
module.__all__[]
License
It's opensource and free software, see the LICENSE for more details.
Credits
- This project is inspired by export joke :: http://github.com/zsiciarz/export
- Written in CudaText :: https://github.com/Alexey-T/CudaText/
- Lot a thnx SO topic writers https://stackoverflow.com/q/44834
TODO
[ ] export(None)
- export nothing outside pkg
[ ] may be implement private()
public()
etc decorator to classes
[ ] your ideas?
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for import-export-0.2.67.dev5.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 61b04401f62890ac9b8f15cf23427e4704028777fb6dc17d01172c5b6f78239f |
|
MD5 | 09a2238c4f8b695c7f9fe82b29eb3209 |
|
BLAKE2b-256 | 589462bda29fe86c1636efbca190d91eb2335309766239136e1e6d19b6674063 |