A library for interacting with the learning platform anton.app.
Project description
antonLib
antonLib is a python library created for interacting with the learning platform "anton.app".
Installing
To install antonLib simply type
pip install antonLib
into your command prompt.
To dwonload the source code you can just type this.
git clone https://github.com/Antonabi/antonLib.git
Requirements
If you downloaded the source code you have to install the requirements like this:
pip install -r requirements.txt
Usage
With antonLib you can make a lot of things. View the full documentation here.
Examples
Here ill list a few examples that show what the library does.
Logging in
There are two different ways of logging in with antonLib.
The first one is the simplest:
import antonLib
session = antonLib.loginWithCode("yourLoginCode") #creates a session object
For the second one you need to have your logId:
import antonLib
session = antonLib.logInWithLogId("yourLogId") #also creates a session object
If you dont know what a logId is, here is a description.
Pixel Paint
When you are logged in, you can do many things. Here is how you like a pixel paint image:
import antonLib
session = antonLib.loginWithCode("yourLoginCode") #logging in
session.likePixelPaint("imageUid") #liking the image
If you dont know how to get the uid of an image, its actually quite simple.
To get it, you just need to click on the image, and then click on "share image". Then you will get a link that looks like this: https://anton.app/pixelPaintImage/RqfT06Mp
. The uid is at the end of the link. In this example it is "RqfT06Mp".
Creating Users
With antonLib you can also create users. Creating a user is very simple. This is an example script that does it:
import antonLib
createdUser = antonLib.createUser("username") #creating the user
session = antonLib.logInWithLogId(createdUser.logId) #logging in (you have to log in with the logId because a created user object doesnt give you a login code)
Full Documentation
Check out the full documentation here.
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
Built Distribution
Hashes for antonLib-0.1.1.1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 704ace56ff909a8ed2b2af67a4f4c64ecb5d7810b826070a4bb35df489612779 |
|
MD5 | b7c937571806353065d362ce30c5dd7a |
|
BLAKE2b-256 | 44f33a9fb4dd79453000051c938bb47a31916082b01ee38f5a207c78e7e7ae20 |