A Python library for interacting with the Itaú 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 to your local environment:
pip install .
For development, sync your venv with uv:
uv sync --all-extras --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:
-
Ensure you have uv installed and are running
Python >= 3.12 -
Clone the repository and
cdinto it -
Sync the virtual environment, installing dependencies with
uv sync -
Create a
.envfile in the root directory with the following content:ITAU_USER_ID=your_user_id ITAU_PASSWORD=your_password_base64_encodedReplace
your_user_idandyour_passwordwith your actual Itau credentials, password should be encoded in base64. -
Run tests:
uv run pytest -
Run linters and formatters:
uv run black . uv run pflake8 uv run 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
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 itau_uy_api-0.6.0.tar.gz.
File metadata
- Download URL: itau_uy_api-0.6.0.tar.gz
- Upload date:
- Size: 19.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6c4805c09e9068ef1df12136828e4111c9dca5ad0d9579b5ad7213e33c38a9a3
|
|
| MD5 |
f153de915a69fa7bc0fe32d9676b9d2f
|
|
| BLAKE2b-256 |
3fc051f5d4d52850f27240cd6125b21d10d198687c0dc563e8f178c7217d3083
|
File details
Details for the file itau_uy_api-0.6.0-py3-none-any.whl.
File metadata
- Download URL: itau_uy_api-0.6.0-py3-none-any.whl
- Upload date:
- Size: 8.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e264dc99683630c0a4e06cbf5326f4f5018c344ff35dda9030b8d6fb83618012
|
|
| MD5 |
2e3e3c407f3038dedafbee5b91977206
|
|
| BLAKE2b-256 |
7710c94f251188b9626611e2f8dc185e67da6f46bc4bd9a8adfdc163adfa2016
|