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.1.tar.gz (5.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.1-py3-none-any.whl (6.6 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: doguda-0.1.1.tar.gz
  • Upload date:
  • Size: 5.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.1.tar.gz
Algorithm Hash digest
SHA256 bda5ca8f6541985411959de4e761a0fa21e55c15f5753cf977a71720de9411b2
MD5 4366b646ae9665554780bb1a90ce654c
BLAKE2b-256 ec9eaabb50631fdd2e996060fea23cc4cffe493b43609f4105709ac19ad1e9e0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: doguda-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 6.6 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4c5c08d46d6cd42a08e0a4b4dd5646119f57e54fd064a36f9878e4ff0ed7d296
MD5 98313ca09c7c00093fcc5f7b78f8d618
BLAKE2b-256 3babdcccd051fdea1244202e129227aab2ce9fe745e0bb11d0b92e7f83d7a112

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