Python SDK for Wialon API
Project description
🚀 Wialon SDK
📋 Index
🚀 Description
This is an unofficial SDK for Wialon's API, developed to simplify integration with the Wialon vehicle and fleet management system. This SDK allows access to various functionalities of the Wialon system through a simple and powerful Python interface.
✨ Characteristics
- 📡 Authentication and session management
- 📊 Real-time data access and historical reports
- 🚗 Management of units, drivers, and geofences
- 🔄 Asynchronous functions for improved performance
- 🔧 Python 3.8+ compatibility
🛠 Installation
You can install the SDK using pip:
# Clone the repository
git clone https://github.com/tetotille/wialon-sdk.git
# Navigate to the project directory
cd wialon-sdk
# Install the package
pip install .
Previous requirements
- Python 3.8 or higher
- An active account in Wialon Hosting
- Wialon API Key
📚 Use
Below is an example of how to start using the SDK:
from wialon import Wialon
# Initialize the connection with the API key
client = Wialon(api_url="https://hst-api.wialon.com/wialon/ajax.html", api_key="YOUR_API_KEY")
# Authenticate with the API
client.auth.login("YOUR_API_KEY")
# Obtain the list of units
units = client.request("core/search_items", {"spec": {"itemsType": "avl_unit", "propName": "sys_name", "propValueMask": "*", "sortType": "sys_name"}, "force": 1, "flags": 1, "from": 0, "to": 0})
for unit in units['items']:
print(f"Unit: {unit['nm']}, ID: {unit['id']}")
# Obtain historical data
history = client.messages.load_interval(item_id=12345, time_from=datetime(2023, 1, 1), time_to=datetime(2023, 1, 2))
print(history)
📄 Documentation
Consult the complete documentation for more details about all available features.
🔍 Examples
Some additional examples to perform common tasks:
- Authentication and session management
- Obtaining real-time locations
- Generation of activity reports
Check the examples folder for more examples.
🤝 Contributions
Contributions are welcome! If you want to contribute, follow these steps:
- Fork the project.
- Create a branch for your feature (
git checkout -b feature/new-functionality). - Commit your changes (
git commit -m 'Add new functionality'). - Push your changes (
git push origin feature/new-functionality). - Open a Pull Request.
Check the CONTRIBUTING.md file for more details.
🛣 Roadmap
- Basic authentication and session management
- Initial support for unit management
- Fetching real-time data
- Basic historical data retrieval
- Documentation and examples for initial features
- Community feedback and initial improvements
📄 License
This project is under the MIT License. Check the LICENSE file for more details.
Note: You can use, modify, and distribute this software freely, provided you maintain attribution to the original author.
💬 Acknowledgments
To all developers and the community for their support and contributions to this project.
📫 Contact
If you have questions or suggestions, do not hesitate to open an issue.
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
File details
Details for the file wialon_sdk-0.4.6.tar.gz.
File metadata
- Download URL: wialon_sdk-0.4.6.tar.gz
- Upload date:
- Size: 20.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.12.0
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5990cce5266ac262d00ac18d83b24c48759d7a9fb5b8ac9ebe30cd6ed6f22bbf
|
|
| MD5 |
999db214450ff2e880a25bdcea9dd962
|
|
| BLAKE2b-256 |
e8b291b0684a1fb78856999c6c4ea5f3d401f2d3df508437fa9a98a5a4adb181
|