Skip to main content

Add your description here

Project description

Doguda quickstart

Define your commands in doguda_app.py so the doguda CLI can find them:

# doguda_app.py
from pydantic import BaseModel

from doguda import DogudaApp, doguda


class UrlToMarkdownResponse(BaseModel):
    markdown: str


app = DogudaApp()


@doguda  # registers on the default Doguda app
async def url_to_markdown(url: str) -> UrlToMarkdownResponse:
    return UrlToMarkdownResponse(markdown=f"received: {url}")

# Doguda will use your function's return annotation as the FastAPI response model,
# so you can shape responses with your own Pydantic models.

CLI

doguda url_to_markdown --url "https://example.com"

Set a different module with DOGUDA_MODULE=my_module or --module my_module.

HTTP

Start the FastAPI server (defaults to doguda_app in the current directory):

doguda serve

Then POST to your function at /v1/doguda/<function_name>:

curl -X POST http://localhost:8000/v1/doguda/url_to_markdown \
  -H "Content-Type: application/json" \
  -d '{"url": "https://example.com"}'

Organizing commands in a package

You can also make doguda_app a package to auto-load submodules that register commands:

doguda_app/
  __init__.py
  urls.py       # contains @doguda functions
  reports.py    # contains @doguda functions

The loader imports all submodules, so any @doguda usages inside doguda_app/* are registered without extra wiring. Keep DOGUDA_MODULE=doguda_app (or --module doguda_app) and run doguda serve or doguda <command> as usual.

Running with uv (and flox)

If you're using uv from the flox env, activate it (or prefix with flox run) and keep the cache inside the repo to avoid permission issues:

UV_CACHE_DIR=$PWD/.flox/cache/uv uv run python -m doguda serve --module doguda_app

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

doguda-0.1.0.tar.gz (4.7 kB view details)

Uploaded Source

Built Distribution

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

doguda-0.1.0-py3-none-any.whl (5.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: doguda-0.1.0.tar.gz
  • Upload date:
  • Size: 4.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.15 {"installer":{"name":"uv","version":"0.9.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for doguda-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cad13100dc28eb602a6273ca112201b2e54418d2b171970141f624d03a5d8122
MD5 e9a81f356968fb5c47eb80737ca66b33
BLAKE2b-256 aa3c85778d8dcec3478fae0d0a532cd48366fa24b5c1c290c2195a2cfad84956

See more details on using hashes here.

File details

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

File metadata

  • Download URL: doguda-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.9.15 {"installer":{"name":"uv","version":"0.9.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for doguda-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4100465cd16e0c12ff90fd44cd2b578233e77f058b2d0776138894edabbc1aac
MD5 f9dafcaabc14f78ae9b687713159d53e
BLAKE2b-256 fa4b619bf462a396a349f393162c740437e1de38f87e693a95916716646142f2

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