Skip to main content

A simple Python module that wraps the API.

Project description


Build Status

A simple Python module that wraps the API. (read about Meduza on Buzzfeed)


pip install meduza


Get an article:

>>> url = ""

>>> article = meduza.get(url)

>>> article["title"]
'The Real Russia. Today.'

>>> article["second_title"]
"Trump and Putin meet in Helsinki, the ‘Deep State’ consensus, and Pussy Riot's heart-to-heart with the police"

Get the latest articles on this section:

# English version:

>>> for article in meduza.section('news', n=3, lang='en'): 
...     print(f" - '{article['title']}'")
 - 'Chechnya’s ruler has a stable full of prize-winning race horses, but you’d never know it, looking at his income declarations'
 - 'Russian musicians are being forced to cancel their concerts across the country, which makes now the perfect time to listen to their music'
 - 'The Real Russia. Today.'

# Russian version:

>>> for article in meduza.section('news', n=3, lang='ru'):
...     print(f" - '{article['title']}'")
 - 'Путина спросили про пенсионную реформу. Он ответил, что ему все не нравится'
 - 'В Екатеринбурге открыли барельеф с «условными» Дзержинским и Сталиным (или Кагановичем)'
 - 'Новая иллюзия: круги, раскрашенные в четыре разных цвета (на самом деле нет)'

You can find available tags and sections in constants:

>>> meduza.EN_SECTIONS

>>> meduza.EN_TAGS
('news', 'like it or not', 'games')

>>> meduza.RU_SECTIONS
('news', 'articles', 'shapito', 'razbor', 'games', 'podcasts')

>>> meduza.RU_TAGS
('новости', 'истории', 'разбор', 'шапито', 'игры', 'подкасты', 'партнерский материал')

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Filename, size & hash SHA256 hash help File type Python version Upload date
meduza-18.12.1.tar.gz (4.1 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page