Skip to content

vyahello/python-package-template

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Release License Hits-of-Code

Python package template

This project is aimed to provide instructions to build own python package from the scratch. All steps are used from packaging-projects official tutorial.

Tools

Usage

There are couple of steps you have to accomplish to have own python package:

  • Make sure you have package ready to be shipped e.g example
  • Create bunch of meta files: README.md, LICENSE.md and requirements.txt files
  • Create setup.py file
  • Generate distribution packages
    • Update setuptools and wheel:
      ➜ pip install --user --upgrade setuptools wheel
    • Run command from the same directory where setup.py is located:
      ➜ python setup.py sdist bdist_wheel
    • You should see newly created dist/ directory with .tar.gz extension file
  • Upload package to PIP (python package index)
    • Create test account on https://test.pypi.org/account/register
    • Install twine package
      ➜ pip install --user --upgrade twine
    • Upload all of the archives under dist/
      ➜ python -m twine upload --repository-url https://test.pypi.org/legacy/ dist/*
  • Install brand new python package
    pip install --index-url https://test.pypi.org/simple/ --no-deps package-tutorial-vyahello

Then please launch following intructions from your environment:

from example import tutorial

t = tutorial.Tutorial("foo", "bar")
t.meta()

Meta

Author – Volodymyr Yahello vyahello@gmail.com

Distributed under the MIT license. See LICENSE for more information.

You can reach out me at:

Contributing

  1. clone the repository
  2. configure Git for the first time after cloning with your name and email
  3. pip install -r requirements.txt to install all project dependencies

About

📦 Reflects howto's for simple python packaging

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages