Skip to main content

The simplest and quickest way to build and upload a PyPI package

Project description

Quick-PyPI

The simplest and quickest way to build and upload a PyPI package

Installation

pip install quick-pypi

Minimum Example

Before you start, you need to have several things:

  • Determine a unique PyPI package name, easy to remember, like 'quick-pypi-test';
  • Have a PyPI account, then export your upload token to a txt file in your computer;
  • Use PyCharm IDE to develop your own package. NOT notebook!

Step 1: Prepare your PyCharm project tree like:

PyCharm Project Root
 -- src
   -- your_package_name
     -- __init__.py
     -- your_class.py   # where you can write your own code!
 -- dists               # auto generated folder storing uploading version history
   -- 0.0.1
   -- 0.0.2
   -- ...
   -- VERSION           # a file storing the latest version of uploading
 quick-pypi.py          # Main settings of uploading package

Step 2: The simplest quick-pypi.py file content is below:

from quick_pypi.deploy import *
auto_deploy(
    cwd=os.path.dirname(os.path.realpath(__file__)), # current working directory, generally as project root
    name="quick-pypi-test",
    description="This is a quick-pypi-test package!",
    pypi_token='../../pypi_upload_token.txt', # the token string or path from your PyPI account
)

Step 3: Deploy the package to PyPI server

After you finish writing your codes in the src package, you can just simply right-click the quick-pypi.py to run, and wait for its completion.

Step 4: Check if the package is uploaded successfully!

Complicated Example settings for advanced users

from quick_pypi.deploy import *
auto_deploy(
    cwd=os.path.dirname(os.path.realpath(__file__)),
    name="quick-pypi-test",
    long_name="Quick Pypi Test Package",
    description="This is a quick-pypi-test package!",
    long_description="This is a long description!",
    src_root="src",
    dists_root=f"dists",
    pypi_token='../../pypi_upload_token.txt', # a file storing the token from your PyPI account
    test=False, # determine if uploading to test.pypi.org
    version="0.0.1a0", # fixed version when uploading or using version='auto'
    project_url="http://github.com/dhchenx/quick-pypi",
    author_name="Donghua Chen",
    author_email="xxx@xxx.com",
    requires="jieba;quick-crawler",
    license='MIT',
    license_filename='LICENSE',
    github_username="dhchenx",
    keywords="quick,pypi,deploy",
)

Here you can provide more information about your package, like setting your author's name, email, license, short or long names and descriptions, etc.

License

The quick-pypi project is provided by Donghua Chen.

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

quick-pypi-0.0.1a0.tar.gz (13.9 kB view details)

Uploaded Source

Built Distribution

quick_pypi-0.0.1a0-py3-none-any.whl (17.9 kB view details)

Uploaded Python 3

File details

Details for the file quick-pypi-0.0.1a0.tar.gz.

File metadata

  • Download URL: quick-pypi-0.0.1a0.tar.gz
  • Upload date:
  • Size: 13.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.6

File hashes

Hashes for quick-pypi-0.0.1a0.tar.gz
Algorithm Hash digest
SHA256 a73b78445cc9bda5983ed5f3cc9c390d6bedf3c5090bb5e89e52af1d62a24ae0
MD5 3ffad7c874e73d58d4b57ae325b10066
BLAKE2b-256 00476315af67ac790edcd9a003fe06af3cad89d20e425429c286157293c2c878

See more details on using hashes here.

File details

Details for the file quick_pypi-0.0.1a0-py3-none-any.whl.

File metadata

  • Download URL: quick_pypi-0.0.1a0-py3-none-any.whl
  • Upload date:
  • Size: 17.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.27.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.6.6

File hashes

Hashes for quick_pypi-0.0.1a0-py3-none-any.whl
Algorithm Hash digest
SHA256 ce4dc7e06d0f3549d623a8df25f6dade2b3f06e0c6dfdc7268933f323b61731f
MD5 310a1f306e28915741b3f0cd34745cdb
BLAKE2b-256 b6c29f8dc83f7c0fee068d784b890537c0204f681aa68608d7cd20bdab628627

See more details on using hashes here.

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