Skip to main content

Python-оболочка для API Anixart

Project description

AnixartPy

Python-оболочка для работы с API Anixart (версия 9.0+)

PyPI License: MIT

[!WARNING]
Проект разработан в ознакомительных целях.
Аутентификационные роуты скрыты - работа возможна только с пользовательским токеном.

🔥 Возможности

  • Создание, удаление, оценивание и редактирование статей
  • Управление своими каналами и их участниками

📦 Установка

pip install anixartpy

🚀 Быстрый старт

from anixartpy import AnixartAPI, ArticleBuilder, Style, enums

# Инициализируйте API с помощью своего токена (None, чтобы получать данные в качестве гостя)
api = AnixartAPI(token="your_token_here")

# Создайте конструктор статей
article_data = ArticleBuilder(channel_id=123)\
    .add_header("Заголовок статьи")\
    .add_paragraph(f"Это {Style.underline('подчёркнутый')} текст.")\
    .add_quote("Это цитата", caption="Автор", alignment=enums.QuoteAlignment.CENTER)\
    .add_delimiter()\
    .add_list(["Элемент списка 1", "Элемент списка 2", "Элемент списка 3"], ordered=True)\
    .add_media(["path/to/image.jpg", "https://example.com/image.png", open("path/to/image.jpg", "rb").read()])\
    .add_embed("https://example.com")

# Создайте статью
article = api.get_channel(123).create_article(article_data)

# Получите комментарии к этой записи
for comment in api.get_article(19735).get_comments(enums.Sorting.NEW, page=None):
    # page: None - все страницы с нуля, range(0, 5) - с 0 до 4 страницы включительно, 0 - только 1 страницу
    print(comment.profile.login, comment.message, sep=' - ')

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

anixartpy-0.3.6.tar.gz (15.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

anixartpy-0.3.6-py3-none-any.whl (18.5 kB view details)

Uploaded Python 3

File details

Details for the file anixartpy-0.3.6.tar.gz.

File metadata

  • Download URL: anixartpy-0.3.6.tar.gz
  • Upload date:
  • Size: 15.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.6

File hashes

Hashes for anixartpy-0.3.6.tar.gz
Algorithm Hash digest
SHA256 bff51b34dd5e8ef4e5fc96acc13cb78800b4ee849c567a798673e9963cce2a55
MD5 d606763f1eff7a5e1e025af4284e51a8
BLAKE2b-256 f0668f697d4696e23b916d2ac31f118a18f00f290995fa0b79f614862324262f

See more details on using hashes here.

File details

Details for the file anixartpy-0.3.6-py3-none-any.whl.

File metadata

  • Download URL: anixartpy-0.3.6-py3-none-any.whl
  • Upload date:
  • Size: 18.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.10.6

File hashes

Hashes for anixartpy-0.3.6-py3-none-any.whl
Algorithm Hash digest
SHA256 d742e2f42d00f8ddf9817f94e68f33f7655edb9cf1afe3402ffd3b2ce7400910
MD5 680ee45f0f358d1e39219370ed5ede13
BLAKE2b-256 58af5bfed5f5472b727fc3932652308eee66a96cddac300aed82790ebfc606f0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page