{"id":16421216,"url":"https://github.com/wilmerm/alanube-python","last_synced_at":"2026-01-06T19:10:24.282Z","repository":{"id":188911410,"uuid":"679634276","full_name":"wilmerm/alanube-python","owner":"wilmerm","description":"Python library to establish connections with the Alanube API.","archived":false,"fork":false,"pushed_at":"2024-10-09T13:15:24.000Z","size":99,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-12-30T12:45:30.810Z","etag":null,"topics":["alanube","dgii","dominican-republic","facturacion-electronica","invoice","library","python","script"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/alanube/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/wilmerm.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-17T09:21:29.000Z","updated_at":"2024-10-09T13:15:27.000Z","dependencies_parsed_at":"2023-08-17T12:46:53.197Z","dependency_job_id":"72a4ffed-8af7-4c73-8ea1-678bc66d0646","html_url":"https://github.com/wilmerm/alanube-python","commit_stats":null,"previous_names":["wilmerm/alanube-python"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wilmerm%2Falanube-python","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wilmerm%2Falanube-python/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wilmerm%2Falanube-python/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/wilmerm%2Falanube-python/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/wilmerm","download_url":"https://codeload.github.com/wilmerm/alanube-python/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238401703,"owners_count":19465848,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["alanube","dgii","dominican-republic","facturacion-electronica","invoice","library","python","script"],"created_at":"2024-10-11T07:31:16.722Z","updated_at":"2025-10-26T22:30:38.330Z","avatar_url":"https://github.com/wilmerm.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Alanube Python API\n\nA lightweight Python client for connecting to the Alanube e-invoicing API across multiple countries.\n\n[![PyPI version](https://img.shields.io/pypi/v/alanube.svg)](https://pypi.org/project/alanube/)\n[![License: MIT](https://img.shields.io/badge/License-MIT-blue.svg)](LICENSE)\n[![Tests](https://img.shields.io/badge/tests-passing-brightgreen.svg)](#running-the-tests)\n\n\n## 📚 Table of Contents\n\n- [Installation](#installation)\n- [Usage](#usage)\n- [Contents](#contents)\n- [Developers](#developers)\n- [Testing](#running-the-tests)\n- [Build \u0026 Publish](#building-and-publishing-the-library)\n- [Credits](#credits)\n- [License](#licence)\n- [Contribute](#contribution-💗)\n\n\n## Instalation\n\nTo install the Alanube library, you can use pip:\n\n```sh\npip install alanube\n```\n\n## Usage\n\n```py\n# Import the Alanube class specific to the country,\n# in this case from `alanube.do` for the Dominican Republic\nfrom alanube.do import Alanube\n\n# Connect to the API\nAlanube.connect(\"[TOKEN]\")\n\npayload = {...}\n\ndata = Alanube.send_document(encf_type=31, payload)\n```\n\nNow you can easily and efficiently use the Alanube API with this Python library!\n\n### Dominican Republic API Methods\n\n| Method | Description |\n|--------|-------------|\n| `create_company` | Create a new company. |\n| `update_company` | Update company information. |\n| `get_company` | Retrieve company info. |\n| `send_fiscal_invoice` | Issue Fiscal Credit Invoice (31). |\n| `get_fiscal_invoice` | Get status of a Fiscal Credit Invoice. |\n| `get_fiscal_invoices` | List Fiscal Credit Invoices. |\n| `send_invoice` | Issue Consumption Invoice (32). |\n| `get_invoice` | Get status of a Consumption Invoice. |\n| `get_invoices` | List Consumption Invoices. |\n| `send_debit_note` | Issue Debit Note (33). |\n| `get_debit_note` | Get status of a Debit Note. |\n| `get_debit_notes` | List Debit Notes. |\n| `send_credit_note` | Issue Credit Note (34). |\n| `get_credit_note` | Get status of a Credit Note. |\n| `get_credit_notes` | List Credit Notes. |\n| `send_purchase` | Issue Purchase Document (41). |\n| `get_purchase` | Get status of a Purchase Document. |\n| `get_purchases` | List Purchase Documents. |\n| `send_minor_expense` | Issue Minor Expense Document (43). |\n| `get_minor_expense` | Get status of a Minor Expense Document. |\n| `get_minor_expenses` | List Minor Expense Documents. |\n| `send_special_regime` | Issue Special Regime Document (44). |\n| `get_special_regime` | Get status of a Special Regime Document. |\n| `get_special_regimes` | List Special Regime Documents. |\n| `send_gubernamental` | Issue Government Document (45). |\n| `get_gubernamental` | Get status of a Government Document. |\n| `get_gubernamentals` | List Government Documents. |\n| `send_export_support` | Issue Export Support Document (46). |\n| `get_export_support` | Get status of an Export Support Document. |\n| `get_export_supports` | List Export Support Documents. |\n| `send_payment_abroad_support` | Issue Payment Abroad Support Document (47). |\n| `get_payment_abroad_support` | Get status of a Payment Abroad Support Document. |\n| `get_payment_abroad_supports` | List Payment Abroad Support Documents. |\n| `send_cancellation` | Issue a cancellation document. |\n| `get_cancellation` | Get status of a cancellation. |\n| `get_cancellations` | List cancellations. |\n| `get_received_document` | Retrieve a received document. |\n| `get_received_documents` | List received documents. |\n| `check_directory` | Check active companies in directory. |\n| `check_dgii_status` | Check DGII service status and maintenance. |\n| `get_report_companies_documents_total` | Get total documents issued by a company. |\n| `get_report_users_documents_total` | Get total documents issued by the authenticated user. |\n| `get_report_company_emitted_documents` | Get total documents emitted by a company. |\n| `get_report_company_emitted_documents_monthly` | Monthly totals of emitted documents (12 months). |\n| `get_report_company_emitted_documents_15_days` | Daily totals of emitted documents (last 15 days). |\n| `get_report_company_accepted_documents` | Total documents accepted by DGII for a company. |\n| `get_report_company_accepted_documents_monthly` | Monthly totals of accepted documents (12 months). |\n| `get_report_company_accepted_documents_15_days` | Daily totals of accepted documents (last 15 days). |\n\n## Contents\n\n- `do`: Fully implemented for the Dominican Republic (DGII).\n- `pa`, `cr`, `pe`, `bo`: Planned support. Follow the structure of the `do` module.\n\nFor 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.\n\n### Links\n* [Alanube Official Website](https://www.alanube.co/)\n* [Alanube Documentation](https://developer.alanube.co/)\n\n## Roadmap\n\n- [x] 🇩🇴 Dominican Republic\n- [ ] 🇵🇦 Panama\n- [ ] 🇨🇷 Costa Rica\n- [ ] 🇵🇪 Peru\n- [ ] 🇧🇴 Bolivia\n\n## Used by\n\nThis library is trusted and used in production by:\n\n\u003ctable\u003e\n  \u003ctr\u003e\n    \u003ctd align=\"center\" width=\"250\"\u003e\n      \u003ca href=\"https://www.unolet.com\" target=\"_blank\"\u003e\n        \u003cimg src=\"https://cdn.unolet.com/img/unolet/unolet-logo.svg\" width=\"120px\" alt=\"Unolet Logo\"/\u003e\u003cbr/\u003e\n        \u003cb\u003eUnolet\u003c/b\u003e\n      \u003c/a\u003e\n      \u003cbr/\u003e\n      \u003csub\u003e\u003ci\u003eERP and electronic invoicing platform for SMEs.\u003c/i\u003e\u003c/sub\u003e\n    \u003c/td\u003e\n  \u003c/tr\u003e\n\u003c/table\u003e\n\nIf your company uses this library and would like to be listed here, feel free to [open a pull request](https://github.com/wilmerm/alanube-python/pulls) or [create an issue](https://github.com/wilmerm/alanube-python/issues).\n\n## Developers\n\nIf you're contributing to the development of this library, here are the steps to set up your environment and run the tests:\n\n### Setting Up the Environment\n\n1. Clone the repository:\n\n    ```sh\n    git clone https://github.com/wilmerm/alanube-python.git\n    cd alanube-python\n    ```\n\n2. Create a virtual environment (optional but recommended):\n\n    ```sh\n    python -m venv venv\n    source venv/bin/activate  # On Windows: venv\\Scripts\\activate\n    ```\n\n3. Install the required dependencies:\n\n    ```sh\n    pip install -r requirements.txt\n    pip install -r requirements-dev.txt\n    ```\n\n4. Install the library in editable mode:\n\n    ```sh\n    pip install -e .\n    ```\n\n5. **Code Style**. We follow PEP 8 for coding standards. Please ensure your code is formatted accordingly before submitting a pull request.\n\n    ```sh\n    flake8 alanube\n    ```\n\n### Running the Tests\n\n1. Navigate to the project root directory.\n\n2. Execute the tests with unittest:\n\n    ```sh\n    python -m unittest discover -s alanube/tests -p \"*.py\"\n    ```\n\n    * -s: Specifies the directory to look for tests (tests folder).\n    * -p: Defines the pattern for test file names (e.g., *.py).\n\n### Building and Publishing the Library\n\nTo compile and upload the library to PyPI, follow these steps:\n\n1. Ensure you have the necessary dependencies:\n\n    ```sh\n    pip install build twine\n    ```\n\n2. Build the package:\n\n    ```sh\n    python -m build\n    ```\n\n3. (Optional) Verify the package:\n\n    ```sh\n    twine check dist/*\n    ```\n\n4. Upload the package to PyPI:\n\n    ```sh\n    python -m twine upload dist/*\n    ```\n\n## Credits\n\n\u003ctable\u003e\n    \u003ctr\u003e\n        \u003ctd align=\"center\"\u003e\n            \u003ca href=\"https://github.com/wilmerm\"\u003e\n                \u003cimg src=\"https://github.com/wilmerm.png\" width=\"100px;\" alt=\"Wilmer Martinez\"/\u003e\u003cbr /\u003e\n                \u003csub\u003e\u003cb\u003eWilmer Martinez\u003c/b\u003e\u003c/sub\u003e\n            \u003c/a\u003e\n            \u003cbr/\u003eAuthor \u0026 Maintainer\n        \u003c/td\u003e\n        \u003ctd align=\"center\"\u003e\n            \u003ca href=\"https://github.com/Bamidele123456\"\u003e\n                \u003cimg src=\"https://github.com/Bamidele123456.png\" width=\"100px;\" alt=\"Oriku Precious\"/\u003e\u003cbr /\u003e\n                \u003csub\u003e\u003cb\u003eOriku Precious\u003c/b\u003e\u003c/sub\u003e\n            \u003c/a\u003e\n            \u003cbr/\u003eDocumentation Contributor\n        \u003c/td\u003e\n    \u003c/tr\u003e\n\u003c/table\u003e\n\nIf 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.\n\n\n## Licence\n\nThis project is licensed under the MIT License.\n\n## Proyect Status\n\n✅ This project is in production and actively maintained.\n\n## Contributing\n\nWe welcome pull requests and suggestions. Please open an issue or submit a PR.\n\n## Support 💗\n\nIf you find this useful, consider supporting.\n\nYour generosity helps us to continue improving and maintaining this project. We appreciate every contribution, however small. Thanks for being part of our community!\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwilmerm%2Falanube-python","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwilmerm%2Falanube-python","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwilmerm%2Falanube-python/lists"}