Reputation: 1102
I am creating pypi
python package and for that i tired many solution avilable in different websites.
class
and functions
but when tried this one my package gave me an error that no module
and class name is not define
functions
without class
and __init__.py
and here is important files structure provided by pypi
officials
├── LICENSE
├── README.md
├── example_pkg
│ └── __init__.py
├── setup.py
└── tests
I am ready with my package but after spending whole night finding which one is Best coding practice? and now got confused
so my questions are as follows
__init__.py
?Upvotes: 2
Views: 1077
Reputation: 21520
I'd recommend following the Python Packaging Authorities guides and tutorials at https://packaging.python.org.
In addition, the PyPA publishes an example project skeleton that you can use as a starting point: https://github.com/pypa/sampleproject/
Upvotes: 2