Skip to main content

pyfree

  • A simple package to get data from OPEN APIs for your test projects or exp projects. No need to remember the URLS.

Functions

  • from pyfree import FreeAPI
  • FreeAPI.get_bank_details('SBIN0012345') - to get bank details

How to create a PyPi package and Host it on pyPi server

  1. create a package with all the modules inside it.
  2. create LICENSE, README.md, setup.py, etc (with content from above URL or from my repo)
  3. Generating distribution archives - python setup.py sdist bdist_wheel - will create 2 files(source archive and wheels ) inside dist/. These are the file that will be pushed to the server
  4. create a acount for TestPYPI - https://test.pypi.org/account/register/
  5. Upload to test-PYpi using twine. (install twine if not installed) . OPTIONAL - twine check dist/* and twine upload --repository testpypi dist/*
  6. It should be uploaded and follow the steps that you see after upload to test or install your package in local.
  7. You have successfully installed and uploaded package to TestPypi. Follow the same steps for https://pypi.org/account/register/

notes

  • A common way to distribute is to - source archive and wheels

files

  • setup.py - setup.py is the build script for setuptools. It tells setuptools about your package (such as the name and version) as well as which code files to include
  • setup.cfg - a configuration for setup.py. More at - https://stackoverflow.com/questions/39484863/whats-the-difference-between-setup-py-and-setup-cfg-in-python-projects and https://docs.python.org/3/distutils/configfile.html
  • .pypirc - A .pypirc file allows you to define the configuration for package indexes (referred to here as “repositories”), so that you don’t have to enter the URL, username, or password whenever you upload a package with twine or flit. - https://packaging.python.org/specifications/pypirc/. (we place it in ~/.pypirc) (after adding it i just had to do twine upload and it take token and other credential from HOME/.pyprc file)
  • MANIFEST.in - a file where we list all the extra file that needs to be included
  • __main__.py and entrypoint in setup.py - It enables excution of the main file with the module name directly with -m flag. Eg - python -m pyfree will execute content of main inside __main__.py file

setuptools

  • setuptools (which includes easy_install) is a collection of enhancements to the Python distutils that allow you to more easily build and distribute Python distributions, especially ones that have dependencies on other packages.

Twine

  • Twine is the primary tool developers use to upload packages to the Python Package Index or other Python package indexes. It is a command-line program that passes program files and metadata to a web API. Developers use it because it’s the official PyPI upload tool, it’s fast and secure, it’s maintained, and it reliably works.

wheel

  • Primarily, the wheel project offers the bdist_wheel setuptools extension for creating wheel distributions. Additionally, it offers its own command line utility for creating and installing wheels.

Release files for pyfree 1.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pyfree 1.0.0
File Size Uploaded
pyfree-1.0.0.tar.gz 3.6 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pyfree 1.0.0
File Interpreter ABI Platform
pyfree-1.0.0-py3-none-any.whl Python 3 none any Details

Total release size: 8.2 kB

Release files / pyfree-1.0.0.tar.gz

Download URL pyfree-1.0.0.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
264609d0378eae2452a7b42ce7eb8070aa3ae9eee4bdcb0fd3198b8e9d8b4ddc
BLAKE2b-256 checksum
How to use checksums
eae34583d2e3d797a9f9ee6a026073728f6db2a41e02accec8003593341aef49
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.8.5

Release files / pyfree-1.0.0-py3-none-any.whl

Download URL pyfree-1.0.0-py3-none-any.whl
Size 4.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b3829e9e378d35ff6466b45d1c1a8b51c650a27930becab7e2cdf61546cb4117
BLAKE2b-256 checksum
How to use checksums
f02c21aaf18e0b81a51856c9d87b000b17c27e667e7d7f7ddf73e710d513ae54
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.3.0 pkginfo/1.6.1 requests/2.25.1 setuptools/44.0.0 requests-toolbelt/0.9.1 tqdm/4.55.0 CPython/3.8.5

Release history Release notifications | RSS feed

This release

1.0.0 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page