Skip to main content

A simple example package

Project description

This is pkg-test-random

NOTE: before giving the name to packge please check whether package name is available or not to upload

  1. Install Required Tools Make sure you have twine and build installed:

bash pip install -f twine build

  1. Build Your Package Navigate to your project folder and run:

python -m build

  1. Create a PyPI Account Go to PyPI and sign up.

    1. Enable 2FA on PyPI Go to PyPI Account Settings.

    Under "Two-factor Authentication", enable TOTP (Time-based One-Time Passwords).

    Scan the QR code with an authenticator app (like Google Authenticator or Authy).

    Enter the generated 6-digit code to confirm.

    1. Generate an API Token After enabling 2FA, go back to Account Settings.

    Scroll down to "API tokens" and click "Add API Token".

    Give it a name (e.g., mypackage-publish).

    Copy the generated token immediately, as it won’t be shown again.

    Generate an API token under Account Settings.

  2. Upload the Package

    1. Run the following command and enter your credentials when prompted: bash twine upload dist/*

    2. If using an API token, run: bash twine upload dist/* -u token -p YOUR_API_TOKEN

    3. For security, you can store the token in ~/.pypirc:

    [distutils] index-servers = pypi

    [pypi] username = token password = YOUR_API_TOKEN

    Once you've stored the API token in ~/.pypirc, you can upload your package without manually entering credentials by running: bash twine upload dist/*

    Since twine automatically reads the credentials from ~/.pypirc, it will use the stored API token without requiring manual input.

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

pkg_test_random-0.1.0.tar.gz (2.2 kB view details)

Uploaded Source

Built Distribution

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

pkg_test_random-0.1.0-py3-none-any.whl (2.5 kB view details)

Uploaded Python 3

File details

Details for the file pkg_test_random-0.1.0.tar.gz.

File metadata

  • Download URL: pkg_test_random-0.1.0.tar.gz
  • Upload date:
  • Size: 2.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.16

File hashes

Hashes for pkg_test_random-0.1.0.tar.gz
Algorithm Hash digest
SHA256 c8fb228aaebec3f5240c56dc1f3de526fe076e6d1c05a2e633f28dfb0950ab37
MD5 ed095fb9e2a2e5208912d256a759fe2b
BLAKE2b-256 94a94f1fc66009504c74248b022cc04a71099f542915e8991b0ff1c48726c34c

See more details on using hashes here.

File details

Details for the file pkg_test_random-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for pkg_test_random-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5ab451721f55575034339a7066b1d54640c36036710bb5f13fea9025a5a2bdde
MD5 9d392460f40cfb70e8b4d90f5ebe2efb
BLAKE2b-256 33ae7fba28fdcca0107198c5cbc608e2dc6e7d8b7a11798e0ec1f7802afb53c1

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