This feature adds support for publishing the project to PIP/PyPI, allowing users to easily install and manage the package using Python's package manager.
Why we need the feature
Publishing the project to PIP/PyPI will significantly increase its accessibility and ease of use for Python developers. It will allow users to install the package with a simple pip install command, manage dependencies more effectively, and integrate the package into their existing Python projects seamlessly.
How to implement and why
Create setup.py:
This file is essential for packaging the project. It will include metadata about the project such as name, version, author, and dependencies.
Example:
from setuptools import setup, find_packages
setup(
name='bancos_brasileiros',
version='0.1.0',
author='Author Name',
author_email='author@example.com',
description='A description of the project',
long_description=open('README.md').read(),
long_description_content_type='text/markdown',
url='https://github.com/username/repo',
packages=find_packages(),
classifiers=[
'Programming Language :: Python :: 3',
'License :: OSI Approved :: MIT License',
'Operating System :: OS Independent',
],
python_requires='>=3.6',
)
Update README.md:
Add installation instructions using PIP.
Example:
## Installation
You can install the package using pip:
```bash
pip install bancos_brasileiros
Create a .pypirc file:
This file will store your PyPI credentials for uploading the package.
By following these steps, we can ensure that the project is properly packaged and published to PIP/PyPI, making it easily accessible to the Python community.
Original issue: #229
What is the feature
This feature adds support for publishing the project to PIP/PyPI, allowing users to easily install and manage the package using Python's package manager.
Why we need the feature
Publishing the project to PIP/PyPI will significantly increase its accessibility and ease of use for Python developers. It will allow users to install the package with a simple
pip install
command, manage dependencies more effectively, and integrate the package into their existing Python projects seamlessly.How to implement and why
Create
setup.py
:Example:
Update
README.md
:Example:
Create a
.pypirc
file:Example:
Build the package:
setuptools
to build the package.Upload the package to PyPI:
twine
to upload the package.Automate the process:
Example workflow (
.github/workflows/publish.yml
):By following these steps, we can ensure that the project is properly packaged and published to PIP/PyPI, making it easily accessible to the Python community.
Test these changes locally