Skip to main content

A Python library for creating packages in a fast and easy way.

Project description

PyPkgGen

PyPkgGen Logo

Python Package Generator is a Python library for generating Python libraries for PyPI.org in an easier and faster way. Do you not know how to package your Python project? Or do you want an easier and faster way to package your Python projects? If yes, then PyPkgGen is for you. In just a few commands, your Python project will be live on PyPI.org and developers will be able to install it using pip.

Table of Contents

Installation

Installing PyPkgGen from PyPI will install all the libraries required to build your Python projects. Follow the instructions below to install PyPkgGen:

Use pip/pip3 to install from PyPI

$ pip install pypkggen

You can also use Python from your command prompt

$ python -m pip install pypkggen

Lastly, to install from GitHub (ensuring that Git has been added to PATH), run:

$ python -m pip install git+https://www.github.com/Samuel-HSSP/pypkggen

Usage

PyPkgGen is best used on the terminal. Make sure you have Python and Pip installed on your computer and they must be added to PATH. The following section of the documentation will guide you on how to package your Python project using PyPkgGen.

  1. Initialize Python REPL Shell
    $ python
    
  2. Create a folder called source and move all your source files (.py) into this folder. Note the path to this folder because it will be your code_source_dir when generating your package.
  3. Follow the instructions below and run the codes to generate your Python project.
>>> from pypkggen import pypkggen
>>> generator = pypkggen.PyPkgGen("package_name", "import_name", "code/source/dir/")

'package_name' is the name you want to give your Python package 'import_name' is the name your package will be stored with. This is what you will use to import the package 'code_source_dir' is the path to source containing all the source files for your project.

>>> generator.generate_setup_file("filename.txt", test=True)

A simple setup file will be generated in the current working directory with the filename given, as a text file. Set test to True if you want to test your package first on test.pypi.org before publishing on PyPI.org. It is recommended to set it to True because you should test your package before publishing. Edit the setup file and run this final code:

>>> generator.create_package(test=True)

The code above will start creating your package. Make sure you set test to True if you did that on the previous code and False if you had set it to False when generating setup file. Carefully follow the instructions given when creating your package. All the files you need will be generated automatically for you. Make sure you double-check them and edit to your taste.

Congratulations! You should now have your package published to PyPI.

To-Do

  • Automate terminal commands
  • Make it more intuitive
  • Add more functionalities
  • Proper documentation
  • Fix all the bugs, and probably add more

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pypkggen-0.0.1.tar.gz (34.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pypkggen-0.0.1-py3-none-any.whl (34.2 kB view details)

Uploaded Python 3

File details

Details for the file pypkggen-0.0.1.tar.gz.

File metadata

  • Download URL: pypkggen-0.0.1.tar.gz
  • Upload date:
  • Size: 34.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.5.0 keyring/23.5.0 rfc3986/1.4.0 colorama/0.4.4 CPython/3.8.3rc1

File hashes

Hashes for pypkggen-0.0.1.tar.gz
Algorithm Hash digest
SHA256 7b757ba758d2e1e588d09b6411c96c9719dd9eda897df12b00273638f9cc4c6e
MD5 56850fffedddf5bdac66b1c514c7beb5
BLAKE2b-256 5d9dd501da624e400a61beb275fd0f591849e2e78d19639642c8189a1851d6d1

See more details on using hashes here.

File details

Details for the file pypkggen-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: pypkggen-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 34.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.5.0 keyring/23.5.0 rfc3986/1.4.0 colorama/0.4.4 CPython/3.8.3rc1

File hashes

Hashes for pypkggen-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 94f744c5d44ed0d11b21ddf33b0a970beb98a01b3da145cf8182ed3459a2dd78
MD5 4724a7c8311c619af42c8e00a7c35eb4
BLAKE2b-256 03726a13d41d9c17ce03cd6012f85adeeaeb5d43279d4d0d7542040349a646e9

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page