Skip to main content

API wrapper for scratch

Project description

RUS

ScratchPlus

Что такое ScratchPlus?

ScratchPlus - это библиотека для работы со Scratch Api для Python :snake:.

Что может наш модуль?

  • [✔️] Работать с данными скретча
  • [✔️] Писать и читать комментарии
  • [✔️] Работать с облачными проектами на Scratch
  • [❌] Регестрироватся на Scratch
  • [✔️] Читать форумы и получать данные о постах
  • [✔️] Кодирование числовых облачных данных скретча в обычные строки
  • [❌] Постить на форумах

Преимущества перед аналогом (ScratchClient)

  • [👍] Возможность автоматический кодировать и декодировать облачные данные
  • [👍] Чтение комментариев профиля путём парсинга
  • [👍] Если вы не хотите входить в аккаунт, есть Read-Only режим.
  • [👍] Вы можете войти в несколько аккаунтов сразу и выполнять от них действия в асинхронном режиме

Используймые библеотеки или API:

  • Requests - Библеотека Для удобной работы с протоколом HTTP.
  • ScratchDB - API Для работы с форумами на Scratch.
  • IsScratcher - API Для проверки статуса Скретчера

Установка

Для установки можно возпользоваться командой pip install scratchplus

Начало

## Документация
### Подключение к аккаунту
Для работы с большей части API нужно авторизоваться (см. ниже)

from scratchplus import Session account = Session("username_on_scratch", "password")

### Методы Get
После авторизации, мы можем получить объект из APi для далнейшей работы с ним
Здесь будет приведёт список всех Get Заросов 
#### get_user

account.get_user("username")

Метод возращает объект класса YourUser или AnotherUser 
#### get_project

account.get_project(22814354) # ID проекта как аргумент

Метод возращает объект класса YourProject или AnotherProject 

Спасибо

  • Пользователю github Quatum-Codes за парсер комментариев

ENG

Scratch Plus

What is ScratchPlus?

ScratchPlus is a Scratch API library for Python :snake:.

What can our module do?

  • [✔️] Work with scratch data
  • [✔️] Write and read comments
  • [✔️] Work with cloud projects on Scratch
  • [❌] Register on Scratch
  • [✔️] Read forums and get post data
  • [✔️] Encode scratch numeric cloud data into normal strings
  • [❌] Post on forums

Advantages over analogue (ScratchClient)

  • [👍] Ability to automatically encode and decode cloud data
  • [👍] Read profile comments by parsing
  • [👍] If you don't want to login, there is a Read-Only mode.
  • [👍] You can log in to multiple accounts at once and perform actions from them asynchronously

Libraries or APIs used:

  • Requests - Library For convenient work with the HTTP protocol.
  • ScratchDB - API For working with Scratch forums.
  • IsScratcher - API To check Scratcher status

Installation

To install, you can use the command pip install scratchplus

Start

## Documentation
### Account connection
To work with most of the API, you need to log in (see below)

from scratchplus import Session account = Session("username_on_scratch", "password")

### Get Methods
After authorization, we can get an object from API for further work with it
This will list all Get Zaros
#### get_user

account.get_user("username")

The method returns an object of class YourUser or AnotherUser
#### get_project

account.get_project(22814354) # project ID as argument

The method returns an object of class YourProject or AnotherProject

Thanks

  • To github user Quatum-Codes for the comment parser

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

scratchplus-1.1.tar.gz (11.2 kB view details)

Uploaded Source

File details

Details for the file scratchplus-1.1.tar.gz.

File metadata

  • Download URL: scratchplus-1.1.tar.gz
  • Upload date:
  • Size: 11.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.9 tqdm/4.64.0 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.6.9

File hashes

Hashes for scratchplus-1.1.tar.gz
Algorithm Hash digest
SHA256 f18fb526d1df7ca53ce73ee4fb5391c28448015d2c87c8c34f149c374ca7765a
MD5 d6424a3f90a2b824422cd0713c129ff6
BLAKE2b-256 3b8a376151b6f0a01deab0436b7bc62a3059a48600eb0210fb2cd120ffe745a0

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