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.1.9.tar.gz (3.7 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.1.9-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: geewiz-0.1.9.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.8.3 CPython/3.10.13 Darwin/23.6.0

File hashes

Hashes for geewiz-0.1.9.tar.gz
Algorithm Hash digest
SHA256 32b80fac25b505a41c2c44c9880fb1b879da6c9f7cb78496237ca52ad82bd104
MD5 5a0ed3983df68e1fdfaa5da3b3953cc7
BLAKE2b-256 55a5318c44b7021bd7eeddbd2ac8e7fbc66c05b0756ed76c97ae1af2cb5f9443

See more details on using hashes here.

File details

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

File metadata

  • Download URL: geewiz-0.1.9-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.13 Darwin/23.6.0

File hashes

Hashes for geewiz-0.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 08999a09403ae19a7a9af39fba573419ec2598cb011e7c4e2dd7deeede18a620
MD5 9292c719cf4ecefd250739dadf5e2887
BLAKE2b-256 d8cc5903679586aafe3f00b3621f1e91a382829ccc5b8d75daa76ca4852f936f

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