Skip to content

ssi-dk/ssi_pingme

Repository files navigation

ssi_pingme

Dev mode

#Create the dev environment in ./.venv then activate it so you're working in it
conda env create -p ./.venv --file conda.dev.env.yaml
conda activate ./.venv
#Need to add kernel to jupyterhub for processing on server, ipykernel is part of conda.dev.env.yaml
python -m ipykernel install --user --name=Pingme
#After this change your kernel to Pingme via JupyterHub (top right of a notebook)

#Now we need to create the repo locally
nbdev_export

#with it created we can install the dev env
pip install -e '.[dev]'
#optional test to ensure it worked
core_hello_world test #to test everything works

#now we can do nbdev_prepare
nbdev_prepare

If releasing to conda be sure to add the channel povilasmat to your conda for envyaml

Install

pip install ssi_pingme

How to use

To run as a webservice, be sure the config_file has the webhook param!

!pingme_start_webservice -h
usage: pingme_start_webservice [-h] [--host HOST] [--port PORT]
                               [--config_file CONFIG_FILE]

Start the PingMe API server.

options:
  -h, --help                 show this help message and exit
  --host HOST                Host to run the server on (default: 127.0.0.1)
  --port PORT                Port to run the server on" (default: 5000)
  --config_file CONFIG_FILE  Path to config file"
!pingme_webhook_default -h
usage: pingme_webhook_default [-h] [--config_file CONFIG_FILE]

options:
  -h, --help                 show this help message and exit
  --config_file CONFIG_FILE
!pingme_webhook_simple -h
usage: pingme_webhook_simple [-h] [--config_file CONFIG_FILE] title text

positional arguments:
  title
  text

options:
  -h, --help                 show this help message and exit
  --config_file CONFIG_FILE
!pingme_webhook_card -h
usage: pingme_webhook_card [-h] [--config_file CONFIG_FILE] card

positional arguments:
  card

options:
  -h, --help                 show this help message and exit
  --config_file CONFIG_FILE

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Contributors 2

  •  
  •