Skip to main content

flyewin

Official Python client for the flye.win APIs. No dependencies, Python 3.8+.

pip install flyewin
from flyewin import Flye

flye = Flye()  # reads FLYE_API_KEY, or Flye("flye_sk_...")

print(flye.utils.uuid(count=2))

Test keys

Keys that start with flye_test_ answer with the documented examples, need no plan and use no quota (30 requests/minute, 1,000/day). Use them while building and in CI, then switch to a flye_sk_ key. Create both at https://flye.win/dashboard/keys.

Errors

Every failure raises FlyeError with a stable code:

from flyewin import Flye, FlyeError

try:
    flye.utils.hash(text="hi")
except FlyeError as err:
    if err.code == "rate_limited":
        ...  # err.status == 429

Network errors and 5xx on GET requests are retried twice with backoff, and so is a 429 with a short Retry-After. Change it with Flye(max_retries=0).

Rate limit and quota headers of the last call are in flye.last_response.headers (x-ratelimit-remaining, x-quota-remaining).

Options

Flye(api_key=None, *, base_url="https://flye.win/v1", timeout=30.0, max_retries=2)

Every method also takes timeout= for that call.

Methods

Stickers — flye.stickers

Search stickers and animated GIFs, with ready-to-use links. Docs: https://flye.win/apis/stickers

Method HTTP
stickers.search() GET /stickers/search Search stickers
stickers.list_packs(q="gato") GET /stickers/packs List packs
stickers.get_pack("...") GET /stickers/packs/{id} Stickers in a pack

CDN — flye.cdn

Image hosting with public links, organized in projects and folders. Docs: https://flye.win/apis/cdn

Method HTTP
cdn.upload(image=open("photo.jpg", "rb"), project="...") POST /cdn/upload Upload an image
cdn.list_projects() GET /cdn/projects List projects
cdn.create_project(name="...") POST /cdn/projects Create a project
cdn.get_project("...") GET /cdn/projects/{project} List images
cdn.get_image("...") GET /cdn/images/{id} Image details
cdn.delete_image("...") DELETE /cdn/images/{id} Delete an image
cdn.delete_project("...") DELETE /cdn/projects/{project} Delete a project
cdn.get_usage() GET /cdn/usage Storage and limits

Utils — flye.utils

UUIDs, hashes, base64 and IP inspection in one call. Docs: https://flye.win/apis/utils

Method HTTP
utils.uuid() GET /utils/uuid Generate UUIDs
utils.hash(text="flye") GET /utils/hash Compute a hash
utils.base64(text="...") POST /utils/base64 Encode / decode base64
utils.ip() GET /utils/ip Source IP

Uploads take bytes, an open binary file, a path, or (filename, bytes).

Full reference and the OpenAPI spec: https://flye.win/docs · https://flye.win/openapi.json

Metadata

Release files for flyewin 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for flyewin 0.1.0
File Size Uploaded Provenance Actions
flyewin-0.1.0.tar.gz 7.8 kB Without provenance Details for flyewin-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for flyewin 0.1.0
File Interpreter ABI Platform Actions
flyewin-0.1.0-py3-none-any.whl Python 3 none any Details for flyewin-0.1.0-py3-none-any.whl

Total release size: 16.3 kB

Release files / flyewin-0.1.0.tar.gz

Download URL flyewin-0.1.0.tar.gz
Size 7.8 kB
Tags Source
SHA-256 checksum
How to use checksums
d3f012576ab2a7f2b3f62db3e1b4b8bc5fff14f7e16ea61bfd441eff8e9ca2b4
BLAKE2b-256 checksum
How to use checksums
a6802aa38be7280e205854aec709eb630610bc1539ebfa918ae3de4755e09a67
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.9

Release files / flyewin-0.1.0-py3-none-any.whl

Download URL flyewin-0.1.0-py3-none-any.whl
Size 8.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
5a501501c2cecb8e3eebee1c33c6c06282de297d1a09700e45fbdf8cbd120542
BLAKE2b-256 checksum
How to use checksums
4ed14ec728cf0a341c7fb2e16c8dd518d9dc47c67c778a7446fc10b581e6342a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.7.9

Security for flyewin 0.1.0

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page