noob-gradio
A lightweight, async, dependency-free alternative to the official python
gradio_client— written for speed, simplicity, and control.
Features
- Fast & Async – built on top of
aiohttpandaiofiles, thats all - Smart Parameter Checking – validates types, min/max/step before sending
- Tiny Dependency Footprint – no heavy
huggingface_huband it's reqiurements (a lot) - Drop-in familiar syntax – like the official client, but simpler and async
Installation
pip install noob-gradio
Details
This project was inspired by the official gradio_client but rewritten to:
remove unnecessary dependencies,
run fully async,
and perform parameter validation before sending data to the server.
- gradio_client is ok, but it installs a ton of stuff, so this is a noob remake of it.
- Available functions: "handle_file", "client.predict" and "client.view_api".
- Client functions are async and must be awaited.
- The syntax is exacly the same as in official gradio_client.
New in 1.0.1
You can pass existing session to Client, to reuse it.
import aiohttp
from noob_gradio import Client
async def main():
session = aiohttp.ClientSession()
client = Client("url", session=session)
# added in 1.0.2, will also work
client.set_session(session)
result = await client.predict(kwargs)
print(result)
# in on_close or similar event/function, at exit
await session.close()
Example
import asyncio
from noob_gradio import Client, handle_file
async def main():
async with Client("black-forest-labs/FLUX.1-schnell") as client:
result = await client.predict(
prompt="a cat sitting on a chair",
width=512,
height=512,
api_name="/infer",
)
print(result)
# you should get a path to downloaded image and image seed - (Result, Seed) or whatever the space returns
# to not download you can add download_files=False in Client
asyncio.run(main())
Also this supports the hf_token and other methods of creating a Client and session, here is example of everything
client = Client("black-forest-labs/FLUX.1-schnell", hf_token="secret", download_files=False, headers={"User-Agent": "gradio_real/1.0"})
async def main():
async with client:
# args and kwargs are suported
res = await client.predict("a white cat", width=512, api_name="/infer")
print(res)
# "async with" alternative
await client.connect()
await client.view_api()
# example file
file = handle_file("https://raw.githubusercontent.com/gradio-app/gradio/main/test/test_files/bus.png")
# also you can choose different space for each predict or view_api, with src
res = await client.predict(src="some space with file support", file=file, api_name="/predict")
print(res)
await client.close()
# "async with" or "connect+close" is required because its async
handle_file is needed for input of image or any file, local or from url - predict(image=handle_file("local_path_or_url"), ...)
Metadata
Release files for noob-gradio 1.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| noob_gradio-1.2.0.tar.gz | 12.0 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| noob_gradio-1.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.7 kB
Release files / noob_gradio-1.2.0.tar.gz
| Download URL | noob_gradio-1.2.0.tar.gz |
|---|---|
| Size | 12.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
951c0edaf3253a830415c8b640a9bb1d13a6f461851290ad28812ba439058055
|
|
BLAKE2b-256 checksum How to use checksums |
8177a92122cca2e961c6bf1fff4bcbb00d84f7cb0014e30059b64ec41bb0b9ac
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 9, 2026.
Transparency logRelease files / noob_gradio-1.2.0-py3-none-any.whl
| Download URL | noob_gradio-1.2.0-py3-none-any.whl |
|---|---|
| Size | 9.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
55061d6d3598c6d4ef6b1a400f14ed165be2d717784c9628d94830a63535a401
|
|
BLAKE2b-256 checksum How to use checksums |
a2b547d7d15ebc4cfcab3a636630e700d7c3ea653d93471bff5184516da708d4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.13.7
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Jan 9, 2026.
Transparency log