A Python library for interacting with the Itau UY bank API
Project description
Itaú UY API
A Python library for interacting with the Itaú Uruguay bank API.
Installation
To install the package with all its dependencies:
pip install .
For development, install with all optional dependencies:
pip install ".[dev]"
If you want to install the package in editable mode for development:
pip install -e ".[dev]"
Usage
from itau_uy_api import ItauAPI
import os
from dotenv import load_dotenv
# Load environment variables
load_dotenv()
# Initialize the API
api = ItauAPI(os.environ['ITAU_USER_ID'], os.environ['ITAU_PASSWORD'])
# Login
api.login()
# Get account information
for account in api.accounts:
print(f"Account Type: {account['type']}")
print(f"Balance: {account['balance']} {account['currency']}")
# Get transactions for the current month
from datetime import datetime
current_month = datetime.now().month
current_year = datetime.now().year
transactions = api.get_month(api.accounts[0]['hash'], current_month, current_year)
# Get credit card transactions
credit_transactions = api.get_credit_card_transactions()
Development
To set up the development environment:
-
Clone the repository
-
Create a virtual environment:
python -m venv .venv
-
Activate the virtual environment:
- On Windows:
.venv\Scripts\activate
- On macOS and Linux:
source .venv/bin/activate
- On Windows:
-
Install dependencies:
pip install ".[dev]"
-
Create a
.env
file in the root directory with the following content:ITAU_USER_ID=your_user_id ITAU_PASSWORD=your_password
Replace
your_user_id
andyour_password
with your actual Itau credentials. -
Run tests:
pytest tests/
-
Run linters and formatters:
black . pflake8 mypy .
Note: Make sure to never commit your .env
file to version control as it contains sensitive information.
Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
- Fork the repository
- Create your feature branch:
git checkout -b feature/AmazingFeature
- Commit your changes:
git commit -m 'Add some AmazingFeature'
- Push to the branch:
git push origin feature/AmazingFeature
- Open a pull request
License
This project is licensed under the MIT License. See the LICENSE file for 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
Built Distribution
Hashes for itau_uy_api-0.1.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3bd1909450bb67e42e756fad9366c26930de83dc410f58dd84b58d16dc6258d0 |
|
MD5 | 49b961a98020d2bbbba90e79a26a8d97 |
|
BLAKE2b-256 | 2b0559679254a1edfb1475ae3a4e76294eb39215bef7266f4d9b5214b721ef9d |