Python library to connect with Alanube API
Project description
Alanube Python API
A lightweight Python client for connecting to the Alanube e-invoicing API across multiple countries.
📚 Table of Contents
Instalation
To install the Alanube library, you can use pip:
pip install alanube
Usage
# Import the Alanube class specific to the country,
# in this case from `alanube.do` for the Dominican Republic
from alanube.do import Alanube
# Connect to the API
Alanube.connect("[TOKEN]")
payload = {...}
data = Alanube.send_document(encf_type=31, payload)
Now you can easily and efficiently use the Alanube API with this Python library!
Contents
do: Fully implemented for the Dominican Republic (DGII).pa,cr,pe,bo: Planned support. Follow the structure of thedomodule.
For the missing countries, you can use the do directory as a reference to build the required implementations, adapting the logic to meet the specific local requirements of each country.
Links
Roadmap
- 🇩🇴 Dominican Republic
- 🇵🇦 Panama
- 🇨🇷 Costa Rica
- 🇵🇪 Peru
- 🇧🇴 Bolivia
Developers
If you're contributing to the development of this library, here are the steps to set up your environment and run the tests:
Setting Up the Environment
-
Clone the repository:
git clone https://github.com/wilmerm/alanube-python-api.git cd alanube-python-api
-
Create a virtual environment (optional but recommended):
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install the required dependencies:
pip install -r requirements.txt pip install -r requirements-dev.txt
-
Install the library in editable mode:
pip install -e .
-
Code Style. We follow PEP 8 for coding standards. Please ensure your code is formatted accordingly before submitting a pull request.
flake8 alanube
Running the Tests
-
Navigate to the project root directory.
-
Execute the tests with unittest:
python -m unittest discover -s alanube/tests -p "*.py"
- -s: Specifies the directory to look for tests (tests folder).
- -p: Defines the pattern for test file names (e.g., *.py).
Building and Publishing the Library
To compile and upload the library to PyPI, follow these steps:
-
Ensure you have the necessary dependencies:
pip install build twine
-
Build the package:
python -m build
-
(Optional) Verify the package:
twine check dist/*
-
Upload the package to PyPI:
python -m twine upload dist/*
Credits
|
Wilmer Martinez Author & Maintainer |
If you contributed to this project and would like to be listed here, feel free to open a pull request adding yourself to the credits section.
Licence
This project is licensed under the MIT License.
Proyect Status
✅ This project is in production and actively maintained.
Contributing
We welcome pull requests and suggestions. Please open an issue or submit a PR.
Support 💗
If you find this useful, consider supporting:
Your generosity helps us to continue improving and maintaining this project. We appreciate every contribution, however small. Thanks for being part of our community!
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 alanube-1.0.0.tar.gz.
File metadata
- Download URL: alanube-1.0.0.tar.gz
- Upload date:
- Size: 18.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
69083353a778eb478c8d3d53656bdef2f8c88acfb7e72968ef2804bf2554fce2
|
|
| MD5 |
90100dddc38cb9365666f100c41926ee
|
|
| BLAKE2b-256 |
f2bb63939afc5f8aec2a21dc20842a1f942cb9948dcb56280f8a1419578a1497
|
File details
Details for the file alanube-1.0.0-py3-none-any.whl.
File metadata
- Download URL: alanube-1.0.0-py3-none-any.whl
- Upload date:
- Size: 18.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
48e1a7706c6362742abe3538d5860fca4cae97180acdd80e3fd629812d7c60c6
|
|
| MD5 |
6c2e962346cf591ffb07e98414cd0cd3
|
|
| BLAKE2b-256 |
e7080d78e9081bb4f7bff1aa897a5addd8303fd8c9763da856e4b4f50dc92bf6
|