Skip to content
This repository has been archived by the owner on Jul 20, 2023. It is now read-only.

mawoka-myblock/m3o-py

Repository files navigation

M3O-Py

codecov

This is the python library for M3O.

Installation

pip install m3o-py

Usage

You import API's like this:

from m3o_py.api import apiService
from asyncio import run

api = apiSerivce("<m3o_api_key>")


async def main():
    await api.upload("params")


run(main())

If you'd use the weather API, you'd do this:

from m3o_py.weather import WeatherService

weather = WeatherService("<m3o_api_key>")


async def rpint_weather():
    res = await weather.now(location="Oberhausen")
    print(f"In {res.location} are {res.temp_c}°C and it feels like {res.feels_like_c}°C. ")

Run the tests

  1. Set your environment variables: export M3O_API_KEY=<your_api_key>
  2. Run the tests: poetry run pytest tests --asyncio-mode=strict

Supported API's

About

A python-library for @M3o

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages