Psqlmodule to interact with psql database
Project description
This respository is to build any python package and push it ot PyPI repository
Procedure (Detailed):
1. Project Structure
Organize your project like this:
your_project/
│
├── src/your_package/ # Your actual Python code
│ ├── __init__.py
│ ├── module1.py
│ └── module2.py
│
├── tests/ # Optional tests
│ └── test_module1.py
│
├── pyproject.toml # Modern way to declare build system
├── setup.cfg # Metadata & configs
├── README.md # Description (shown on PyPI)
├── LICENSE # License (MIT, Apache2, etc.)
└── MANIFEST.in # (optional) include non-Python files
2. pyproject.toml
This tells pip how to build your package. Example:
[build-system]
requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"
[project]
name = "your-package-name" # must be unique on PyPI
version = "0.1.0"
description = "A short description of your package"
readme = "README.md"
requires-python = ">=3.8"
license = {text = "MIT"}
authors = [
{name = "Your Name", email = "you@example.com"}
]
dependencies = [
"requests>=2.0",
]
[project.urls]
Homepage = "https://github.com/yourusername/your_project"
3. setup.cfg (optional, metadata in pyproject.toml is enough, but you can split)
[metadata]
name = your-package-name
version = 0.1.0
author = Your Name
author_email = you@example.com
description = A short description
long_description = file: README.md
long_description_content_type = text/markdown
url = https://github.com/yourusername/your_project
license = MIT
[options]
package_dir =
= src
packages = find:
python_requires = >=3.8
[options.packages.find]
where = src
4. Build the Package
First install the tools:
pip install build twine
Then build your distribution:
python -m build
This creates:
dist/
your_package_name-0.1.0.tar.gz
your_package_name-0.1.0-py3-none-any.whl
5. Install Locally (test before uploading)
pip install dist/your_package_name-0.1.0-py3-none-any.whl
or for development mode:
pip install -e .
6. Upload to PyPI
Create a PyPI account: https://pypi.org/account/register/
Upload with Twine:
python -m twine upload dist/*
If you want to test before real PyPI, use TestPyPI:
python -m twine upload --repository testpypi dist/*
✅ Now your module is pip install your-package-name ready!
Procedure (Simplified):
🔹 1. Install Required Tools
Make sure you have the build & upload tools installed:
pip install build twine
🔹 2. Build Your Package
From your project root (where pyproject.toml / setup.cfg lives):
python -m build
This creates a dist/ folder with files like:
dist/
your_package-0.1.0-py3-none-any.whl
your_package-0.1.0.tar.gz
🔹 3. Upload With Twine
Upload to PyPI (public)
twine upload dist/*
Upload to TestPyPI (sandbox)
twine upload --repository testpypi dist/*
🔹 4. Authentication
The first time, Twine will ask for your PyPI username and password. Best practice now is to use API tokens instead of your account password.
Go to your PyPI account → Account settings → API tokens.
Create a token with scope “Entire account” (or project-specific).
Copy the token (looks like pypi-AgENdGVzdC5weXBpLm9yZw...).
Then use it when prompted:
username = __token__
password = <your-api-token>
🔹 5. Store Credentials Securely (Optional)
Instead of typing credentials every time, you can set them up in ~/.pypirc:
[pypi]
username = __token__
password = pypi-AgENdGVzd...
[testpypi]
repository = https://test.pypi.org/legacy/
username = __token__
password = pypi-AgENdGVzd...
Now you can upload with:
twine upload -r pypi dist/*
or
twine upload -r testpypi dist/*
🔹 6. Verify Upload
After a successful upload:
PyPI: https://pypi.org/project/your-package-name/
TestPyPI: https://test.pypi.org/project/your-package-name/
Users can then install:
pip install your-package-name
or from TestPyPI:
pip install --index-url https://test.pypi.org/simple/ your-package-name
✅ That’s the complete flow: build → upload with twine → authenticate → verify.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file psqlmodule-0.1.6.tar.gz.
File metadata
- Download URL: psqlmodule-0.1.6.tar.gz
- Upload date:
- Size: 21.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
59ca68cf98a8cc7e340456bcea23af970c874238a7bb7ef4d2e2c036c845fccb
|
|
| MD5 |
580f7425f07ca175f423f40893917009
|
|
| BLAKE2b-256 |
7afe33b8a878318dd53a0e579680c84c168ab218cbf330ffc4b2453a695599c1
|
File details
Details for the file psqlmodule-0.1.6-py3-none-any.whl.
File metadata
- Download URL: psqlmodule-0.1.6-py3-none-any.whl
- Upload date:
- Size: 23.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d0864a1a9fccb54ddf99fc533deb394a8775a566e001a7bb96ce857acc882acb
|
|
| MD5 |
a4653c1148dc0763b7872b20ba129d93
|
|
| BLAKE2b-256 |
f477c5fecc950a95b8b2de2d8d1a97a91d2aca61f5b2cd624fba89c363081993
|