A Python project using Poetry for dependency management
Project description
Project1
A Python project using Poetry for dependency management.
Basic Poetry Commands
# Check Poetry version
poetry --version
# Create a new project
poetry new project1
# Check Python version
poetry run python --version
# Add a package dependency
poetry add PACKAGE_NAME
# Example: poetry add requests
# Run a Python file
poetry run python FILE_PATH
# Example: poetry run python ./src/project1/main.py
# Run tests
poetry run pytest
# Build the package
poetry build
# Publish to PyPI
poetry publish
Publishing to PyPI
Prerequisites
- Create a PyPI account at PyPI.org
- Generate an API token in your PyPI account settings
Configuration
# Configure your PyPI token
poetry config pypi-token.pypi YOUR_API_TOKEN_HERE
# Or use environment variable
export POETRY_PYPI_TOKEN_PYPI="your_token_here"
Publishing Steps
# 1. Build the package
poetry build
# 2. Publish to PyPI
poetry publish
# 3. Verify your package is published
# Check https://pypi.org/project/project1/
Testing with TestPyPI (Recommended for first-time publishers)
# Add TestPyPI repository
poetry config repositories.testpypi https://test.pypi.org/legacy/
# Configure TestPyPI token
poetry config pypi-token.testpypi YOUR_TESTPYPI_TOKEN_HERE
# Publish to TestPyPI first
poetry publish --repository testpypi
Development
# Install dependencies
poetry install
# Activate virtual environment
poetry shell
# Add development dependencies
poetry add --group dev pytest
# Run tests
poetry run pytest
Project Structure
project1/
├── pyproject.toml # Project configuration and dependencies
├── poetry.lock # Locked dependency versions
├── src/
│ └── project1/ # Source code
│ ├── __init__.py
│ └── main.py
└── tests/ # Test files
└── test_project1.py
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
adnan_project1-0.1.0.tar.gz
(1.9 kB
view details)
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 adnan_project1-0.1.0.tar.gz.
File metadata
- Download URL: adnan_project1-0.1.0.tar.gz
- Upload date:
- Size: 1.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.4 CPython/3.13.3 Darwin/24.3.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
03675f2dbda8eb66f8a7b68abc1f74822b1fa099ac623292f449f17c12192299
|
|
| MD5 |
e7882bd5c6882d85cc67712f7d6608d9
|
|
| BLAKE2b-256 |
3b4b865e8534489ead56d0e21f8cc16c6314dbca257155199189258fcba4fdb0
|
File details
Details for the file adnan_project1-0.1.0-py3-none-any.whl.
File metadata
- Download URL: adnan_project1-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.6 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/2.1.4 CPython/3.13.3 Darwin/24.3.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c87f12377e9dcaddcb816434e86cfed40cfca58fbe80a1bc16cb78ead65ea787
|
|
| MD5 |
7de9451a98c20ccf11e7a980f40313c6
|
|
| BLAKE2b-256 |
819c80636963fde604fa57e99b91752bfe4956fb418ac3138ce48258fcf7b0b8
|