Skip to main content

No project description provided

Project description

Geewiz

Python SDK for interacting with geewiz.

Installation

pip install geewiz

Usage

Simple

import geewiz

geewiz.set(title="my app")

geewiz.var.my_var = "my value"

username = geewiz.card("get-username")

Showing a card

# show a card with the id "my_card_id"
result = geewiz.card("my_card_id")

# show a card with the id "my_card_id" and override `type` and `items` parameters
result = geewiz.card("my_card_id", type="selectOne", items=["one", "two", "three"])

# show a card with no id
result = geewiz.card(type="selectOne", items=["one", "two", "three"])

# if card doesn't have an input, or you don't need the input, you don't need to save the return value
geewiz.card("my_card_without_input")

Setting a variable

geewiz.var.my_var = "my value"
geewiz.var["my-var-with-dashes"] = "my value"

# you can use the variables you've set
geewiz.var.username = load_username_from_db

if geewiz.vars.username == 'nicholaides':
  # ...

Setting the title of the app

geewiz.set(title="my app")

Getting user config

user_id = geewiz.get_user_config("user_id") # will return None if config value is not set

Advanced: using a non-global client

This can be useful for mocking or testing code that uses Geewiz.

from geewiz.client import GeewizClient

geewiz = GeewizClient()

geewiz.set(title="my app")
geewiz.var.my_var = "my value"
result = geewiz.card("my_card_id")

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

geewiz-0.2.0.tar.gz (3.8 kB view details)

Uploaded Source

Built Distribution

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

geewiz-0.2.0-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file geewiz-0.2.0.tar.gz.

File metadata

  • Download URL: geewiz-0.2.0.tar.gz
  • Upload date:
  • Size: 3.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.16 Darwin/24.4.0

File hashes

Hashes for geewiz-0.2.0.tar.gz
Algorithm Hash digest
SHA256 7b130a1a3cdad904fd01dc54179ebf30411c450f5e2b5136744a3b6f1e7d1844
MD5 6f2ee32e486c05fb7d67355242dc3f8c
BLAKE2b-256 e9c2789344124b786fb2a3fc109fe2bd659d62062434bf79ac5881874a1564c0

See more details on using hashes here.

File details

Details for the file geewiz-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: geewiz-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.16 Darwin/24.4.0

File hashes

Hashes for geewiz-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 061bbfb4f47719b09e28ea2cf0a1fee6a18a410d8a8340c684e26291392592a5
MD5 5ff630399093c168fcaec06fcacc5d8b
BLAKE2b-256 ee4dce007c726d762587a3b3790ada2a1a199a69a25bc912a0a65de0107ee9bc

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