Skip to main content

Python interface for szurubooru

Project description

pyszuru

Python interface for szurubooru

Installation: pip install pyszuru

Usage

Creating API Instance

import pyszuru
mybooru = pyszuru.API(
    "https://example.com/booru",
    username="alice",
    # Authenticate with a password
    password="hunter2",
    # Or use a token
    token="my-token-string",
    # Optionally specify a API base URL if it differs from the default configuration
    # api_url="/booru-api", <-- relative to base URL
    # api_url="https://api.example.com/booru", <-- new absolute base
)

Working with tags

Note: it is reccomended to use the factory functions outlined below instead of calling the Tag constructor directly.

Get existing tag

Get an existing tag from the booru by referencing it by name

marvel_comics_tag = pyszuru.Tag.from_name(mybooru, "marvel_comics")

Create new tag

Create a new tag, must specifiy a primary name only

spiderman_tag = pyszuru.Tag.new(mybooru, "spiderman")

Alter properties of tag

spiderman_tag.implications = spiderman_tag.implications + [marvel_comics_tag]

Working with posts

Searching

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

pyszuru-0.1.5.tar.gz (8.2 kB view details)

Uploaded Source

Built Distribution

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

pyszuru-0.1.5-py3-none-any.whl (21.2 kB view details)

Uploaded Python 3

File details

Details for the file pyszuru-0.1.5.tar.gz.

File metadata

  • Download URL: pyszuru-0.1.5.tar.gz
  • Upload date:
  • Size: 8.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for pyszuru-0.1.5.tar.gz
Algorithm Hash digest
SHA256 4d16b91646996233c36b0a12ff1e9ba92f9ba6a4af4eee2efb30eef5a8cf75e4
MD5 98db3eb2425164bb75666a9c09bbd220
BLAKE2b-256 8679807db437eee060be3b59481e6054f10114e204d64be4d6e99e230405ad59

See more details on using hashes here.

File details

Details for the file pyszuru-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: pyszuru-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 21.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/49.2.0 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.8.5

File hashes

Hashes for pyszuru-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 40c847d87bbea49b091bfc39a69bc1f925ac17f7060d8287f8ea3d37cc00b459
MD5 db80810165f5d1e201d806bc4788d768
BLAKE2b-256 ce550b2898df193779ee384d46c5c13e0c5ef58def8151c045bcd7fed10a6121

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