Skip to main content

Lingus

PyPI

Lingus is an unofficial Duolingo API that can allow users to view data that isn't necesairly accesible from the profile page.
It consists of two types of functions: owner dependent and owner independent . Owner depented functions show data that can only be viewed if the inspected user is the one that has signed in, while the other ones show data accesible to everyone, regardless of authorization.

Function overwiew

Creating a user

#import Lingus
user = Lingus("SampleUsername", "SampleEmail@email.com", "samplepassword123")

The first value ("SampleUsername") specifies what account will be inspected. It does not have to be the account that belongs to the signed-in user, but that will only allow you to use owner independent functions.

Owner dependent functions:

return_user

Returns a dictionary containing various information on the user

# Example use
lingus  = duolingo.Duolingo('samplename', '...')
print(lingo.get_user_info())
# Sample Response
{
            'owner': True
            'premium': False
            'username': "Anonero"
            'name': "Anon"
            'league': "Diamond"
            'active': "Russian"
            'a_crowns': 25
            'a_mastered': 6
            'a_code' : Ru
            'a_level': 18
            'level_progress': 75.00 
            'lessons_c': 300
            'lessons_u': 13
            'streak': 56
            'XP_total': 13454
            'XP_active': 12354
            'XP_recent': 4325
            'lessons_2w': 95
            'lesson_last': "21:39:28, 01/17/2022" 
            'lesson_up_name': "Genitive Case - 1"
            'lesson_up_level': 1
            'lingots': 346
            'crystals': 2634
}

get_tracking_properties

Returns a Pandas DataFrame with a bunch of data about the user, such as some of the data in return_user.

get_premium

Returns a boolean of whether the user owns Duolingo Plus or not.

get_league

Returns a string with the name of the League the user is currently in.

get_lingots

Returns an int with the amount of lingots the user owns.

get_gems

Returns an int with the amount of gems the user owns.

get_num_sessions_completed

Returns an int with the amount of lessons the user has completed

Owner independent functions

session_login

Returns an unformatted dictonary containing all of the data avaliable about the user.

get_readable

Returns json formatted into a readable string with all of the data on the user.

get_fullname

Returns a string with the users account name (not to be confused with username).

get_data

Returns a Pandas DataFrame with a bunch of owner-independent data about the user, such as some of the data in return_user.

get_active_lessons_unlocked

Returns an int with the amount of lessons the user has unlocked in his active language

get_upcoming_lesson_name

Returns a string with the name of the lessons that is considered the users 'next' by Duolingo

get_upcoming_lesson_skill_level

Returns an int with the level of the lesson hinted in get_upcoming_lesson_name

get_skills

Returns a Pandas DataFrame with a bunch of owner-independent data about the users skills, such as some of the data in return_user.

get_current_crowns

Returns an int with the amount of crowns the user has unlocked.

get_current_mastered

Returns an int with the amount of legendary crowns the user has unlocked.

_get_languages

Returns a Pandas DataFrame with data about all languages avaliable on the platform, regardless of whether the user is studying them or not.

get_active_languages

Returns a Pandas DataFrame like _get_languages only with data about languages the user is studying.

get_langauge_string

Returns a string of the language that the user has set as "active".

get_active_level

Returns an int with the level of the language the user has set as active.

get_level_progress

Returns a float with the percentage towards the next level.

get_active_lessoncode

Returns a 2-letter string containing the lessoncode of the language the user has set as active.

get_total_xp

Returns an int with the total amount of xp sumed up from all of the languages the user has studied.

get_active_xp

Returns an int with the amount of XP in users active language.

get_calendar

Returns a Pandas DataFrame with a bunch of data about the users lessons from tha past two weeks.

get_recent_xp

Returns an int with the XP the user has gained over the past two weeks.

get_last_lesson

Returns a string with the date and time of users last lesson but only if it was within the last two weeks.

get_lessons_last_two_weeks

Returns an int with the amount of lessons the user has completed in the last two weeks.

get_streak

Returns an int with the users current streak.

Metadata

Release files for Lingus 0.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Lingus 0.0.2
File Size Uploaded Provenance Actions
Lingus-0.0.2.tar.gz 4.0 kB Without provenance Details for Lingus-0.0.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for Lingus 0.0.2
File Interpreter ABI Platform Actions
Lingus-0.0.2-py3-none-any.whl Python 3 none any Details for Lingus-0.0.2-py3-none-any.whl

Total release size: 7.8 kB

Release files / Lingus-0.0.2.tar.gz

Download URL Lingus-0.0.2.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
d306b69dbdd5b4ebb15709be7cbff01c14f987d51f552782dee7828e6740c9f9
BLAKE2b-256 checksum
How to use checksums
9af3c4180fcd2328cb3222410a3a92a0a3cfdf157e75a885566b85eec3498e34
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.0

Release files / Lingus-0.0.2-py3-none-any.whl

Download URL Lingus-0.0.2-py3-none-any.whl
Size 3.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e8b1ca9d74fc0ad4d2c02082c47a8b11cd4db2d38aa9394a69f610ffc507c461
BLAKE2b-256 checksum
How to use checksums
c0eaccb9d140810985d5b5f20a902328eda28eeaf9b7e3313242ff7b77c99723
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.8.0 pkginfo/1.8.2 readme-renderer/32.0 requests/2.25.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.62.3 importlib-metadata/4.10.1 keyring/23.5.0 rfc3986/2.0.0 colorama/0.4.4 CPython/3.9.0

Security for Lingus 0.0.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.0.2 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page