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...
Let me show here! tldr
1. install
pip install import-export
2. 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 add 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.dev6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1119d091a1dcd3e84885e214cec77b63cfd3bf1de6fd9019709c97129698fd8e |
|
MD5 | 1d1de79aa72ba6f3cf66d7a3e78a8075 |
|
BLAKE2b-256 | 2125423318d8f04a83f4eca8adf089b5409ba173e9d1c9a2caa4f4398c33972f |