Git Product home page Git Product logo

py-package-starter's Introduction

py-package-starter

Built and distribute your own Python package

1. Create a folder

hello-package

2. Create a subfolder and name it with the package name

hello-package

3. Create __init__.py file inside subfolder

4. Create [module].py inside module folder and insert the codes.

5. Create a file setup.py in parent folder and paste the following code

from setuptools import setup, find_packages
import codecs
import os

here = os.path.abspath(os.path.dirname(__file__))

with codecs.open(os.path.join(here, "README.md"), encoding="utf-8") as fh:
    long_description = "\n" + fh.read()

VERSION = '0.0.1'
DESCRIPTION = 'Short Description'

# Setting up
setup(
    name = "hello-package",
    version = VERSION,
    author = "Abdul Fathah KA",
    author_email = "[email protected]",
    description = DESCRIPTION,
    long_description=long_description,
    long_description_content_type = "text/markdown",
    url = "https://github.com/fathah/py-package-starter",
    classifiers = ["Programming Language :: Python :: 3", "License :: OSI Approved :: MIT License", "Operating System :: OS Independent"],
    keywords=['nlp', 'fathah', 'hello'],
    packages = find_packages()
    )

6. Install the package in the same folder and test the package

pip install .

7. Build for distribution

python setup.py sdist bdist_wheel

8. Install twine

pip install twine

9. upload the package to PyPi

twine upload dist/*

py-package-starter's People

Contributors

fathah avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.