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.
Currently, the HTTPClient includes only 2 pre-built methods. These are very basic methods for slash commands. More will be coming soon.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file fuwa-http-1.0.1a0.tar.gz.
File metadata
- Download URL: fuwa-http-1.0.1a0.tar.gz
- Upload date:
- Size: 4.1 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
c30c475eba6c7ea1d474b85cb96ff0ba09ef6b663be970445995d12d95b79c8d
|
|
| MD5 |
8e7e49ff9798529dec0053e95834fe66
|
|
| BLAKE2b-256 |
fb48fe14a9b5015e2c6c17fc01f0faaabaad77e7b1d44e2c054f015dbc53c23e
|
File details
Details for the file fuwa_http-1.0.1a0-py3-none-any.whl.
File metadata
- Download URL: fuwa_http-1.0.1a0-py3-none-any.whl
- Upload date:
- Size: 4.3 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
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a4daedbcd94296ba9b8ac90a50b52dc8e955f90b7a395a6adb4ec3f4e2a078ce
|
|
| MD5 |
13b65b9a6a9790e160a808ba741590ad
|
|
| BLAKE2b-256 |
39f0a3748ee49f81bf972fac385337bd56dfd4f36bd8fafc451ebafcfdd75f2c
|