Skip to main content

Official Python SDK for the Filoo URL shortener API.

Project description

filoo-sdk

Official Python SDK for the Filoo URL shortener API.

Install

pip install filoo-sdk

Quick start

from filoo import Filoo
import os

with Filoo(api_key=os.environ["FILOO_KEY"]) as filoo:
    link = filoo.links.create(
        destination="https://example.com/long-url",
        username="myname",
        slug="campaign-1",
    )
    print(link["short_url"])  # → https://filoo.app/myname/campaign-1

Available methods

  • filoo.me()
  • filoo.usage()
  • filoo.usernames()
  • filoo.links.create(destination, ...)
  • filoo.links.list(limit=, cursor=)
  • filoo.links.get(code)
  • filoo.links.update(code, **fields)
  • filoo.links.delete(code)
  • filoo.links.stats(code)

Tier requirement

The Filoo API is available on Pro (€9/month, 100 req/min) and Agents (€29/month, 1000 req/min) plans. Get a key at filoo.app/dashboard/api-keys.

Errors

FilooError is raised on non-2xx responses. Check error.status and error.body.

from filoo import Filoo, FilooError

try:
    filoo.links.create(destination="...")
except FilooError as e:
    if e.status == 429:
        print("Rate limited, retry later")

License

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

filoo_sdk-0.1.0.tar.gz (2.4 kB view details)

Uploaded Source

Built Distribution

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

filoo_sdk-0.1.0-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

Details for the file filoo_sdk-0.1.0.tar.gz.

File metadata

  • Download URL: filoo_sdk-0.1.0.tar.gz
  • Upload date:
  • Size: 2.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for filoo_sdk-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e58dc7967078e4b566bfcccec130430d19d1812eb464c02bb8d0033d811edbff
MD5 3179fdcce2bcef6f6d74dadb17c384ec
BLAKE2b-256 0cddcb7200e538bc39ae7f301fee96097f6220e67a017397e33bb69308450dfe

See more details on using hashes here.

File details

Details for the file filoo_sdk-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: filoo_sdk-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 2.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.6

File hashes

Hashes for filoo_sdk-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e52f777f2e35d5f4b9fba3d708f39ef85e198ea1917029a59fc492366bed003d
MD5 8d7d20a7b80f707b39c5554f947d1b02
BLAKE2b-256 15c7e60d3a107366013781e0486918d8e34e39635a38d3afeb51ddfcfa84d18b

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