Skip to main content

An asynchronous API wrapper for the Traffic Lanes 3 / Intersection Controller API.

Project description

tl3api

PyPI PyPI - Python Version PyPI - Downloads GitHub

A basic, asynchronous wrapper for the API of Traffic Lanes 3 / Intersection Controller written in Python.

Installation

tl3api was tested on python 3.9, although it should work wither earlier versions too. The recommended and easiest way to install tl3api is pip.

pip install tl3api

Quickstart

The Client can be intialized with a context manager or not depending on which option is better for your application.

import tl3api
import aiohttp

async with tl3api.Client(aiohttp.ClientSession()) as ic:
    # Do stuff

With the ic instance you can then interact with the API:

import tl3api
import aiohttp

async with tl3api.Client(aiohttp.ClientSession()) as ic:
    # Print the name of the user with the ID of 2452411
    user = await ic.get_details_for_user(user_id=2452411)
    print(user)

    # Print the name of each of the user's maps
    maps = await user.get_user_maps()
    for m in maps:
        print(m)

License

tl3api is provided under the MIT license. For more details view the LICENSE file.

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

tl3api-1.2.0.tar.gz (7.6 kB view hashes)

Uploaded Source

Built Distribution

tl3api-1.2.0-py3-none-any.whl (9.2 kB view hashes)

Uploaded Python 3

Supported by

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