Skip to main content

Okaeri Services SDK

Project description

Okaeri SDK for Python

Currently supported services:

Full documentation available on wiki.okaeri.eu in:

Installation

pip install git+https://github.com/OkaeriPoland/okaeri-sdk-python#egg=okaeri-sdk

Example usage

OK! AI.Censor

See full docs in: Polish, English

from okaeri_sdk import AiCensor
from okaeri_sdk.client import OkaeriError
from okaeri_sdk.aicensor import AiCensorError

try:
    aicensor = AiCensor(f"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX")
    prediction = aicensor.get_prediction("o cie k u r//w@!")
    swear = prediction.general.swear
    print(f"swear: {swear}")
except (OkaeriError, AiCensorError) as e:
    print(f"Error: {str(e)}")

OK! No.Proxy

See full docs in: Polish, English

from okaeri_sdk import NoProxy
from okaeri_sdk.client import OkaeriError
from okaeri_sdk.noproxy import NoProxyError

try:
    noproxy = NoProxy(f"XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX")
    info = noproxy.get_info("1.1.1.1")
    proxy = info.risks.proxy
    verify = info.suggestions.verify
    block = info.suggestions.block
    print(f"proxy: {proxy}, verify: {verify}, block: {block}")
except (OkaeriError, NoProxyError) as e:
    print(f"Error: {str(e)}")

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

okaeri-sdk-1.2.0.tar.gz (3.4 kB view details)

Uploaded Source

Built Distribution

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

okaeri_sdk-1.2.0-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file okaeri-sdk-1.2.0.tar.gz.

File metadata

  • Download URL: okaeri-sdk-1.2.0.tar.gz
  • Upload date:
  • Size: 3.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for okaeri-sdk-1.2.0.tar.gz
Algorithm Hash digest
SHA256 3054a5e8bd73d4dc06fdf6707650e47c081ed730a0f6cd220ce429ef7484d43e
MD5 311d56d73e532d6bc803ac59ddc09202
BLAKE2b-256 c6649d7e61b5d991e29ff9f423b5313cf55334a730ab780cfa680b8bbf1a9136

See more details on using hashes here.

File details

Details for the file okaeri_sdk-1.2.0-py3-none-any.whl.

File metadata

  • Download URL: okaeri_sdk-1.2.0-py3-none-any.whl
  • Upload date:
  • Size: 5.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/3.7.3 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.9.2

File hashes

Hashes for okaeri_sdk-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f6731d0e454d43be9f2cbc9462115523aadd2a8ad506cca5b644f4108b4e2549
MD5 c33f2fa00d0a7edaabf9f1f0b37c99f0
BLAKE2b-256 10a86befb82ed0db4f9446b0d37853f159cff92d0b746c2ddf25945f91ca08dc

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