Skip to main content

'Creating an example poetry package'

Project description

Simple Poetry Package

This repository contains a minimal example of how to create, build, and deploy a Python package using Poetry. The package source code is located in the src/simple_poetry_package directory.

Table of Contents

Introduction

Poetry is a tool for dependency management and packaging in Python. It allows you to manage your project’s dependencies, build your project, and publish it to PyPI or other repositories with ease. This repository provides a simple example of how to structure a Python project and use Poetry to handle its dependencies and packaging.

Installation

To get started with this project, you'll need to have Poetry installed. If you don't have it installed yet, you can install it by following the instructions on the official website.

Clone the repository and navigate to the project directory:

git clone https://github.com/rahul1990bhatia/PoetryExample.git
cd simple-poetry-package

Install the dependencies using Poetry:

poetry install

This command will create a virtual environment (if one doesn't exist) and install the dependencies specified in the pyproject.toml file.

Project Structure

Here's an overview of the project's structure:

simple-poetry-package/
├── src/
│   └── simple_poetry_package/
│       ├── __init__.py
│       └── hello_world.py
│       └── cli.py
├── pyproject.toml
├── poetry.lock
└── README.md
  • src/simple_poetry_package/: Contains the source code for the package.
  • pyproject.toml: Defines the project and its dependencies.
  • poetry.lock: Locks the project’s dependencies to specific versions.

Building the Package

To build the package, run the following command:

poetry build

This command will create the distribution files (both sdist and wheel) in the dist/ directory.

Publishing the Package

To publish the package to PyPI or another repository, you can use the following command:

poetry publish

Make sure you have an account on PyPI and use poetry config to set API Token.

License

This project is licensed under the MIT License. See the LICENSE file for more details.

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

simple_poetry_package-0.2.0.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

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

simple_poetry_package-0.2.0-py3-none-any.whl (4.1 kB view details)

Uploaded Python 3

File details

Details for the file simple_poetry_package-0.2.0.tar.gz.

File metadata

  • Download URL: simple_poetry_package-0.2.0.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.11.9 Windows/10

File hashes

Hashes for simple_poetry_package-0.2.0.tar.gz
Algorithm Hash digest
SHA256 84d54c188185bdc35ab6e6589abe66c9404a3e6abe7dde492e25a4da9b70e1b4
MD5 beff6d651cba498d7968bf81ac73ce11
BLAKE2b-256 b04758eb7dd7ddd44d00ad9c68bbcb78c2a42a698efeb62d7eee8051c87c70ae

See more details on using hashes here.

File details

Details for the file simple_poetry_package-0.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for simple_poetry_package-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 164ae498e445c06c9159edd7f4f9e050a1a9a0825ac5cbd6f4000347cd58618f
MD5 703ad173de79e57305f9179f193ac216
BLAKE2b-256 41ce975a0d5d2fe0c07d676ae1432fdb7ce79cf876d75689b5035e0779ad891b

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