Skip to main content

easyPyPI is THE easiest and quickest way to publish your Python creations on the Python Package Index (PyPI) so other people can just `pip install your_script`.

Project description

easyPyPI

easyPyPI (Pronounced "Easy Pie-Pea-Eye") is a quick, simple, one-size-fits-all solution for sharing your Python creations on the Python Package Index (PyPI) so others can just pip install your_script with no fuss.

easyPyPI is mainly intended for Pythonistas who've been put off publishing to PyPI before now or tried it but, like the author (pictured below) thought:

"There must be an easier way to do this!"

Well now there is! With easyPyPI you don't have to spend hours...

  • Reading tutorials about distutils only to realise setuptools is what you need.
  • Reading yet more tutorials just to work out the essential steps (below).
  • Manually creating a folder structure and moving your script(s) there.
  • Manually creating a skeleton README.md
  • Manually creating a skeleton __init__.py
  • Manually creating a skeleton test_yourscript.py
  • Manually creating and updating a LICENSE
  • Manually creating a setup.py script and wondering what on earth to put in it
  • Remembering to update your Version number each time you publish
  • Running setup.py in just the right way to create your distribution files
  • Installing and running twine in just the right way to publish your package to Test PyPI then PyPI
  • Setting environment variables or creating a .pypirc file for twine to use
  • Getting your Test PyPI and PyPI credentials mixed up

Enjoy!

1. QUICKSTART

c:\> pip install easypypi

>>> from easypypi import Package
>>> package = Package()

# or:
>>> package = Package("your_package_name")

Then just follow the prompts to provide the information required to describe your package on PyPI. No knowledge of setuptools, twine, or how to write a setup.py script required.

Once you've gone through the creation process fully (or even partially), click the Save button to store your responses in a JSON config file located in the recommended settings folder for your Operating System. When you start again easyPyPI will helpfully remember your previous answers.

When you've added all the information you want to include with your package, click the Generate button to create a basic folder structure and populate it with all the standard files you'll need such as a README and LICENSE.

The next time you run easyPyPI with an existing package name and folder location, it will automatically import the contents of the latest setup.py file it finds(in preference to config.json), so if you want you can make updates directly to setup.py but be careful to keep the same basic format so easyPyPI has a chance of finding what it needs!

2. UPDATING YOUR PACKAGE

For more precise control you can close the GUI after creating your package object, and manually get and set all of the data encapsulated in it. Thanks to the magic of cleverdict you can do this either using object.attribute or dictionary['key'] notation, whichever you prefer:

>>> package.name
'as_easy_as_pie'

>>> package['email'] = "new@name.com"

>>> package['license_dict'].name
'MIT License'

>>> package.version = "2.0"

3. OTHER FEATURES

Automatically generate the next version number for your Package (more schemas coming soon):

>>> package.version = "1.1"
>>> package.next_version
'1.11'

To find where easyPyPI and its default templates were installed:

>>> package.easypypi_dirpath

To find the location of your JSON config file to manually inspect, edit, or os.remove() it:

>>> package.config_path
# This should be under the default Settings folder for your Operating System.

To locate your package's setup.py:

>>> package.setup_filepath

If you have extra files which you want to copy into the new folder structure, including the main script file you might have already created before deciding to make it into a package:

>>> package.copy_other_files()

To see what else you can play with using your Package object:

>>> package.keys()
# You can then get/set values using object.attribute or dictionary['key'] notation

esyPyPI uses keyring to store credentials. To manage these credentials manually:

>>> account = "Github"  # or "PyPI" or "Test_PyPI"
>>> package.Github_username = "testuser"

>>> package.get_username(account) == package.Github_username == "testuser"
True

>>> package.set_password(account, "testpw")  # Prompts for pw if none given
True

>>> package.Github_password
'testpw'

>>> package.delete_credentials(account)

4. CONTRIBUTING

easyPyPI was developed in the author's spare time and is hopefully at a stage where it works well and reliably for the original use case. If you'd like to get get involved please do log any Issues (bugs or feature requests) on Github, or if you feel motiviated to work on any of the existing Issues that would be brilliant!

If you want to contribute code, please follow this simple process:

  • Fork this repository. Also STAR this repository for bonus karma!
  • Create a new Branch for the issue or feature you're working on.
  • Create a separate test_xyz.py script to accompany any changes you make, and document your tests (and any new code) clearly enough that they'll tell us everything we need to know about your rationale and implementation approach.
  • When you're ready and the new code passes all your tests, create a Pull Request from your Branch back to the Main Branch of this repository.

If you'd be kind enough to follow that approach it'll help speed things on their way and cause less brain-ache all round. Thank you, and we can't wait to hear people's ideas!

You can also get in contact on Twitter, and we're currently dabbling with the CodeStream extension for VS Code which seems to have some helpful collaborative features, so perhaps we can connect with that too?

5. PAYING IT FORWARD

If easyPyPI helps you save time and focus on more important things, please show your appreciation by at least starring this repository on Github or even better:

Buy Me A Coffee

Yummy - thank you!

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

easypypi-1.20.tar.gz (28.4 kB view hashes)

Uploaded Source

Supported by

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