Skip to main content

An itslearning api python library.

Project description

itspylearning

itspylearning is a fully async "It's Learning" API for Python. It can fetch organisations, log into user accounts and fetch information from these accounts like tasks or news.

Getting Started

Dependencies

  • aiohttp

Example

from itspylearning import *
import asyncio

async def loginIntoItsLearning() -> UserService:
    orgs_data = await Itslearning.search_organisations("Organisation Name")
    org = await Itslearning.fetch_organisation(orgs_data[0]["id"])
    return await org.login("Username", "Password")


async def setup():
    userService = await loginIntoItsLearning()
    newsList = await userService.fetch_news()

    print(newsList[0])

loop = asyncio.new_event_loop()
asyncio.set_event_loop(loop)
loop.run_until_complete(setup())

Contributing

Any contribution is welcome. If you can't code, but you have an idea for a feature, just post an issue.

License

This project is licensed under the MIT License - see the LICENSE.md file for details

Acknowledgments

It is inspired by the It's Learning API for Node JS.

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

itspylearning-0.2.7.tar.gz (9.6 kB view hashes)

Uploaded Source

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