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.9.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.9-py3-none-any.whl (3.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: chalk_fancy-1.0.9.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.9.tar.gz
Algorithm Hash digest
SHA256 8215e79e6bf247ac1f64ba190fa71d9cc72bc70c1868ab01e093fee2df317f5b
MD5 a4c5e72bfca67a76568719833e61eeb7
BLAKE2b-256 3005d6dba6a0a064d6608bffaf766dec7d18251e46fdeb12fa7ccaef21b58a27

See more details on using hashes here.

File details

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

File metadata

  • Download URL: chalk_fancy-1.0.9-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.9-py3-none-any.whl
Algorithm Hash digest
SHA256 aa229041090cd01f4b045be059ad450c13f6ff2fb97bd862b431ccfe52251098
MD5 c84dfdf56328365c36626edb720d448a
BLAKE2b-256 ec3c5b0a5555f5935a5751d0a52d9b688e73a108fab0edc103d00eddcf7f2865

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