Skip to main content

The http client implementation for the fuwa eco-system

Project description

Fuwa HTTP

The HTTP client implementation for the fuwa eco-system

Example

import asyncio

from fuwa.fhttp.client import HTTPClient


async def main():
    client = HTTPClient("bot token")
    await client.init() # calls the application info endpoint
    # this is necessary for most endpoints (such as application command
    # related endpoints)

    payload = [
        {
            "type": 1,
            "name": "hello",
            "description": "Hello, World!"
        }
    ]
    await client.bulk_upsert_application_commands(payload, guild_id=942837947315662859)
    await client.close()
    
loop = asyncio.get_event_loop()
loop.run_until_complete(main())

You may think this is quite verbose for a HTTP client, however, the fuwa eco-system doesn't expect you to usue this on its own. This package is used heavily within the command-framework. The package import (from fuwa.fhttp) is fhttp due to the http python standard library. This is to avoid any shadowing issues internally and for you.

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

fuwa-http-1.0.0a0.tar.gz (3.9 kB view details)

Uploaded Source

Built Distribution

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

fuwa_http-1.0.0a0-py3-none-any.whl (4.2 kB view details)

Uploaded Python 3

File details

Details for the file fuwa-http-1.0.0a0.tar.gz.

File metadata

  • Download URL: fuwa-http-1.0.0a0.tar.gz
  • Upload date:
  • Size: 3.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/29.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.56.0 importlib-metadata/4.6.0 keyring/22.3.0 rfc3986/1.4.0 colorama/0.4.4 CPython/3.8.10

File hashes

Hashes for fuwa-http-1.0.0a0.tar.gz
Algorithm Hash digest
SHA256 439b721591ce1fd9a243bbb60e069f59ae93788c607ad2d1322c0114d10f84e1
MD5 a0ecf45386d5958355a68b9a19a0ed23
BLAKE2b-256 6fad9a5692ea17b0875f74b0d893236ac798c3dad82140d67c24b3efe7de1601

See more details on using hashes here.

File details

Details for the file fuwa_http-1.0.0a0-py3-none-any.whl.

File metadata

  • Download URL: fuwa_http-1.0.0a0-py3-none-any.whl
  • Upload date:
  • Size: 4.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/29.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.56.0 importlib-metadata/4.6.0 keyring/22.3.0 rfc3986/1.4.0 colorama/0.4.4 CPython/3.8.10

File hashes

Hashes for fuwa_http-1.0.0a0-py3-none-any.whl
Algorithm Hash digest
SHA256 ac6b84e0bfacd079335c326116e74ee8d19f9ada1f54fa4b474deaf8c1b96b14
MD5 7bae60c3ef3ab49d752bccca404d54b1
BLAKE2b-256 5f7e5cae054ca14982956c5677d545bd95f3eebd9164114cd02fb4bd8d4c74d5

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