Skip to main content

Exaroton API Wrapper

Project description

Exaroton

A Python Wrapper for the Exaroton API

Simply get an API Token from your Account and you're good to go.

Python: 3.6+ Code style: black License: MIT Gitmoji: 💻🔥

Example Usage

Currently all methods are (in my opinion) well documented and properly typehinted. If you see something wrong, don't hestitate to create an Issue.

I may create a full list of all available methods, or even utilize readthedocs.org

# Import Exaroton and set our token
>>> from exaroton import Exaroton
>>> exa = Exaroton("API_TOKEN")

# Get information about the authenticated account
>>> exa.get_account()
{
    "_": "Account",
    "name": "Username",
    "email": "email@example.org",
    "verified": true,
    "credits": 420.69
}

# Get a list of our servers
>>> exa.get_servers()
[
    {
        "_": "Server",
        "id": "7ZxuNK5RX879BFaH",  # Thanks, random.org!
        ...
    },
    {
        "_": "Server",
        "id": "Kf48Td5iVlr8Xu24",  # Thanks, random.org!
        ...
    }
]

# Upload logs to https://mclo.gs
>>> exa.upload_logs("7ZxuNK5RX879BFaH")
{
    "_": "Logs",
    "id": "N5FR4K2",  # Thanks, random.org!
    "url": "https://mclo.gs/N5FR4K2",
    "raw": "https://api.mclo.gs/1/raw/N5FR4K2"
}

# Print logs (this'll most likely spam your output lol)
>>> exa.get_server_logs("7ZxuNK5RX879BFaH")
'one extremely long string with lines seperated by the newline escape character \n'
# It'll print each line seperately when used with `print()`!

All you need to make calls to the API is the Authentication Token you can get from your account page. If you make server-specific calls, you'll need that servers ID, too.

The boring stuff

Licensed under MIT

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

Exaroton-0.0.1.tar.gz (5.8 kB view details)

Uploaded Source

Built Distribution

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

Exaroton-0.0.1-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file Exaroton-0.0.1.tar.gz.

File metadata

  • Download URL: Exaroton-0.0.1.tar.gz
  • Upload date:
  • Size: 5.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

File hashes

Hashes for Exaroton-0.0.1.tar.gz
Algorithm Hash digest
SHA256 93f461ce8d9ebd835295a457f36a811b47a583782f32081fb1dd0dbe864f13a0
MD5 a9fc251e6668698c1176f1f814b1480a
BLAKE2b-256 e2ed052acc162d43bc7e4dcb50a308bd5f8712d16eda1fa6e63a6724167249a1

See more details on using hashes here.

File details

Details for the file Exaroton-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: Exaroton-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.8.1 pkginfo/1.7.1 requests/2.26.0 requests-toolbelt/0.9.1 tqdm/4.62.2 CPython/3.9.7

File hashes

Hashes for Exaroton-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2a4cd7c181a0e9cd251a2cf6fc1009eda7b42eec3bc85c04611697065c873e9d
MD5 fe0f28dc7c7b929bf7480a4059ea569a
BLAKE2b-256 742f45b2c6f305b1069fe534f5fc9c4ccd1e0120fa4ce12fb632fad495cf5a64

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