Skip to main content

Minimal graph context initializer.

Project description

chalk-fancy

Minimal Python module that provides a "graph context" initializer.

Install (editable)

python -m pip install -e .

Usage

Configure ctx user id in parent project

In your parent project .env:

CTX_USER_ID=alice

Create ctx via API (async)

from chalk_fancy import graph_context, get_graph_ctx

async with graph_context():
    ctx = get_graph_ctx(require=True)
    print(ctx.meta["ctx_user_id"])
    # ctx.meta["ctx_id"] is always None (response is not inspected)

To skip the network call (e.g. local tests):

CHALK_FANCY_SKIP_REQUEST=1

By default, the module calls https://ctx-graphics.vercel.app/api/ctx. Override with:

CHALK_FANCY_SERVER_URL=https://your-server

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

chalk_fancy-1.0.8.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

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

chalk_fancy-1.0.8-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

Details for the file chalk_fancy-1.0.8.tar.gz.

File metadata

  • Download URL: chalk_fancy-1.0.8.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for chalk_fancy-1.0.8.tar.gz
Algorithm Hash digest
SHA256 00f329648ab0a9d91ab0b2299041eca15b324e99db6ae0b825997cebf22410ad
MD5 8325217a7c10937d477264064adb8c69
BLAKE2b-256 1d13e0f68666da47eeb22806bb013ebe9f1e2f37738219d66a4fc4a8b21def7c

See more details on using hashes here.

File details

Details for the file chalk_fancy-1.0.8-py3-none-any.whl.

File metadata

  • Download URL: chalk_fancy-1.0.8-py3-none-any.whl
  • Upload date:
  • Size: 3.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.2

File hashes

Hashes for chalk_fancy-1.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 bddca4c4ebab6a1593cc248ab5c9e061ae71f3144b6e9e409b732a01498fa3e7
MD5 4e0bcbf063efb2ab06b89f73acad3f4e
BLAKE2b-256 32e917afc052fcdee3c42384dae4d9bae074704de20c52dd21fcd4eba068bb41

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