python tool to create skeleton for PyPI package?
Question:
I want to write my first python package that I can upload to PyPi.
My question is is there any tool to initialize the required skeleton for the PyPi package ?
So far I have found instructions here http://peterdowns.com/posts/first-time-with-pypi.html but it requires me to create all the files manually. I come from a Perl background and in Perl I could use following to create skeleton for cpan module.
module-starter --module=Foo::Bar --author="Foo Bar" [email protected]
In ruby I could just do
bundle gem foo::bar
I am surprised that there isn’t anything similar in python or may be just I couldn’t find it.
Thanks
Answers:
There is one: cookiecutter-pypackage
By the way, I think you should do it by hand at first so you can have a better understanding about how to creat a python package. When you’re familiar with it, you can use tools to make this task automatically.
Further reading:
- The official package guide: Python Packaging User Guide
- Open Sourcing a Python Project the Right Way
- Cookiecutter: Project Templates Made Easy
You can use Pylease, the v0.3
was released just yesterday.
It works pretty simple:
$ mkdir your_project && cd your_project
$ pylease init your_project
This command creates the basic minimal stuff for a Python project:
setup.py
– with a call to the setuptools setup
method, supplying the name and the version of your project
setup.cfg
– with basic configuration for Pylease
your_project/__init__.py
– with the __version__
variable defined in the module root
Furthermore you can extend it and customise to fit your needs. For more information see the docs.
Old topic but I was looking for a recent answer and couldn’t find one, so here is what I found: a skeleton https://github.com/ionelmc/cookiecutter-pylibrary
It uses the tool cookiecutter.io
I want to write my first python package that I can upload to PyPi.
My question is is there any tool to initialize the required skeleton for the PyPi package ?
So far I have found instructions here http://peterdowns.com/posts/first-time-with-pypi.html but it requires me to create all the files manually. I come from a Perl background and in Perl I could use following to create skeleton for cpan module.
module-starter --module=Foo::Bar --author="Foo Bar" [email protected]
In ruby I could just do
bundle gem foo::bar
I am surprised that there isn’t anything similar in python or may be just I couldn’t find it.
Thanks
There is one: cookiecutter-pypackage
By the way, I think you should do it by hand at first so you can have a better understanding about how to creat a python package. When you’re familiar with it, you can use tools to make this task automatically.
Further reading:
- The official package guide: Python Packaging User Guide
- Open Sourcing a Python Project the Right Way
- Cookiecutter: Project Templates Made Easy
You can use Pylease, the v0.3
was released just yesterday.
It works pretty simple:
$ mkdir your_project && cd your_project
$ pylease init your_project
This command creates the basic minimal stuff for a Python project:
setup.py
– with a call to the setuptoolssetup
method, supplying the name and the version of your projectsetup.cfg
– with basic configuration forPylease
your_project/__init__.py
– with the__version__
variable defined in the module root
Furthermore you can extend it and customise to fit your needs. For more information see the docs.
Old topic but I was looking for a recent answer and couldn’t find one, so here is what I found: a skeleton https://github.com/ionelmc/cookiecutter-pylibrary
It uses the tool cookiecutter.io