Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

floopfloop

PyPI version PyPI downloads Python versions CI License: MIT

Official Python SDK for the FloopFloop API. Build a project, refine it, manage secrets and API keys from any Python 3.10+ codebase.

Install

pip install floopfloop

Quickstart

Grab an API key via the floop CLI (floop keys create my-sdk) or the dashboard → Account → API Keys. Business plan required to mint new keys.

import os
from floopfloop import FloopClient

floop = FloopClient(api_key=os.environ["FLOOP_API_KEY"])

# Create a project and wait for it to go live.
created = floop.projects.create(
    prompt="A landing page for a cat cafe with a sign-up form",
    name="Cat Cafe",
    subdomain="cat-cafe",
    bot_type="site",
)
live = floop.projects.wait_for_live(created["project"]["id"])
print("Live at:", live["url"])

Streaming progress

for event in floop.projects.stream(project_id):
    print(f"{event['status']} ({event['step']}/{event['total_steps']}) — {event['message']}")

Error handling

Every call raises FloopError on non-2xx. Switch on .code:

import time
from floopfloop import FloopClient, FloopError

try:
    floop.projects.create(prompt="...")
except FloopError as err:
    if err.code == "RATE_LIMITED":
        time.sleep((err.retry_after_ms or 5000) / 1000)
    elif err.code == "UNAUTHORIZED":
        print("Check your FLOOP_API_KEY.")
    else:
        print(f"[{err.request_id}] {err.code}: {err}")
    raise

Resources

Namespace Methods
floop.projects create, list, get, status, cancel, reactivate, refine, conversations, stream, wait_for_live
floop.secrets list, set, remove
floop.api_keys list, create, remove
floop.library list, clone
floop.subdomains check, suggest
floop.uploads create (for attaching files to projects.refine)
floop.usage summary
floop.user me

For longer end-to-end patterns — streaming a build, refining mid-deploy, attachment uploads, key rotation, retry-with-backoff — see the cookbook.

Authentication

Two token shapes are accepted on api_key:

Prefix Source Plan gate
flp_… Dashboard → API Keys, floop keys create Business (to mint)
flp_cli_… floop login device token Free (unlimited)

CLI device tokens (flp_cli_…) work here too — handy for local scripts that already logged in through the CLI.

Configuration

floop = FloopClient(
    api_key="flp_...",
    base_url="https://www.floopfloop.com",   # override for staging
    timeout=30.0,                             # seconds
    poll_interval=2.0,                        # for wait_for_live / stream
    user_agent="myapp/1.2.3",                 # appended to User-Agent
)

Use as a context manager to close the underlying httpx.Client:

with FloopClient(api_key="...") as floop:
    floop.projects.list()

Async

AsyncFloopClient mirrors FloopClient on top of httpx.AsyncClient — same arguments, same resource accessors (projects, secrets, api_keys, ...), every method is async def. Use async with to ensure the underlying HTTP client is closed:

import asyncio
from floopfloop import AsyncFloopClient

async def main():
    async with AsyncFloopClient(api_key="flp_...") as floop:
        created = await floop.projects.create(prompt="a cat cafe landing page")
        live = await floop.projects.wait_for_live(created["project"]["id"])
        print(live["url"])

        # Streaming uses `async for`:
        async for ev in floop.projects.stream(created["project"]["id"]):
            print(ev["status"], ev.get("progress"))

asyncio.run(main())

Releasing (maintainers only)

This package publishes to PyPI via trusted publishing (OIDC) — no long-lived API token is stored in GitHub Actions.

Before the first release, register the trusted publisher at https://pypi.org/manage/project/floopfloop/settings/publishing/ (or, for a brand-new project, the pending-publisher page):

  • PyPI project name: floopfloop
  • Owner: FloopFloopAI
  • Repository name: floop-python-sdk
  • Workflow name: release.yml
  • Environment name: leave blank

After that, ship a release by bumping pyproject.toml + src/floopfloop/_version.py, pushing a py-v<version> tag. The release workflow will build, test, and publish.

License

MIT. See LICENSE.

Metadata

Release files for floopfloop 0.1.0a4

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

Source distribution (sdist)

Source distribution for floopfloop 0.1.0a4
File Size Uploaded Provenance Actions
floopfloop-0.1.0a4.tar.gz 21.7 kB With provenance Details for floopfloop-0.1.0a4.tar.gz

Built distribution (wheel)

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

Total release size: 46.4 kB

Release files / floopfloop-0.1.0a4.tar.gz

Download URL floopfloop-0.1.0a4.tar.gz
Size 21.7 kB
Tags Source
SHA-256 checksum
How to use checksums
a9187e53be044a65ec4178ed48c4e8114879bae0c53a28f57c89dc4c1732e838
BLAKE2b-256 checksum
How to use checksums
541ef247660d9895c064eb6bd247eca3975bf2316c218649f7e1b3f3f5b5fe66
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Apr 28, 2026.

Transparency log

Release files / floopfloop-0.1.0a4-py3-none-any.whl

Download URL floopfloop-0.1.0a4-py3-none-any.whl
Size 24.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
276520a5fcbf3d39b50d98c7c87801d9d0070577e21ef2b5d03b8d7f0c4848c2
BLAKE2b-256 checksum
How to use checksums
16e426281826af94eeddb69323e13c4d2f6ff0a8a7b086d314e93caaf9cbeb05
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 Apr 28, 2026.

Transparency log

Security for floopfloop 0.1.0a4

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.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for floopfloop-0.1.0a4.tar.gz

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 Apr 28, 2026.

Transparency log

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.

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