Skip to main content

Python SDK for Wialon API

Project description

🚀 Wialon SDK

Lint and Type Check Codacy Badge

📋 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:

  1. Authentication and session management
  2. Obtaining real-time locations
  3. Generation of activity reports

Check the examples folder for more examples.

🤝 Contributions

Contributions are welcome! If you want to contribute, follow these steps:

  1. Fork the project.
  2. Create a branch for your feature (git checkout -b feature/new-functionality).
  3. Commit your changes (git commit -m 'Add new functionality').
  4. Push your changes (git push origin feature/new-functionality).
  5. 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

wialon_sdk-0.4.6.tar.gz (20.8 kB view details)

Uploaded Source

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

Hashes for wialon_sdk-0.4.6.tar.gz
Algorithm Hash digest
SHA256 5990cce5266ac262d00ac18d83b24c48759d7a9fb5b8ac9ebe30cd6ed6f22bbf
MD5 999db214450ff2e880a25bdcea9dd962
BLAKE2b-256 e8b291b0684a1fb78856999c6c4ea5f3d401f2d3df508437fa9a98a5a4adb181

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page