Skip to main content

Wrapper to interact with the Kappa tool suite

Project description

Do

>>> import kappy
>>> client = kappy.KappaRest("http\://url_of/the_server","project_name")

to get a kappa client that uses the REST API hosted by http://url_of/the_server and deals with project project_name.

Do

>>> import kappy
>>> client = kappy.KappaStd()

to get a kappa client that uses a kappa agent installed locally. Add a string argument specifing the path/to/KaSimAgent to use a specific agent.

A kappa agent can be obtained thanks to the opam package manager through:

$ opam install atdgen lwt
$ opam pin add --dev KaSim

The methods of client is described in the kappa_common.py file in the source distribution.

A minimal example of usage is

>>> model = "%agent: A(x[x.A]) %var: k_on 1e-2 'rule' A(x[.]), A(x[.]) <-> A(x[1]), A(x[1]) @ k_on, 1 %plot: |A(x[.])| %init: 100 A()"
>>> client.add_model_string(model)
>>> client.project_parse()
>>> sim_params = kappy.SimulationParameter(pause_condition="[T] > 100",plot_period=1)
>>> client.simulation_start(sim_params)
>>> while client.get_is_sim_running(): sleep(0.1)
>>> results = client.simulation_plot()
>>> client.shutdown()

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

kappy-4.0.93-cp37-cp37m-manylinux1_x86_64.whl (12.4 kB view details)

Uploaded CPython 3.7m

kappy-4.0.93-cp36-cp36m-manylinux1_x86_64.whl (12.4 kB view details)

Uploaded CPython 3.6m

kappy-4.0.93-cp35-cp35m-manylinux1_x86_64.whl (12.4 kB view details)

Uploaded CPython 3.5m

kappy-4.0.93-cp34-cp34m-manylinux1_x86_64.whl (12.4 kB view details)

Uploaded CPython 3.4m

kappy-4.0.93-cp27-cp27mu-manylinux1_x86_64.whl (12.4 kB view details)

Uploaded CPython 2.7mu

kappy-4.0.93-cp27-cp27m-manylinux1_x86_64.whl (12.4 kB view details)

Uploaded CPython 2.7m

File details

Details for the file kappy-4.0.93-cp37-cp37m-manylinux1_x86_64.whl.

File metadata

  • Download URL: kappy-4.0.93-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.3

File hashes

Hashes for kappy-4.0.93-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 47e59a466c59df538c9d8798eb0fd9ffdf4849eb705e50b731a8fda632e3af7e
MD5 626941168220abe62e6354bc1fb75e67
BLAKE2b-256 a5438839f74b1f57973cbc8375e881503a5bc8878d622c0818d88e43a24fda49

See more details on using hashes here.

File details

Details for the file kappy-4.0.93-cp36-cp36m-manylinux1_x86_64.whl.

File metadata

  • Download URL: kappy-4.0.93-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.3

File hashes

Hashes for kappy-4.0.93-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 127a7ec9cd65846d8fea75dbf3f3d2fae76450830dec16501f76880c3ec42170
MD5 167ea407b62bb56f81719a6f534ef0a7
BLAKE2b-256 73936faae01c0f4c288a72b5d349ed3463cf129dc57e805a5fb310636507de9f

See more details on using hashes here.

File details

Details for the file kappy-4.0.93-cp35-cp35m-manylinux1_x86_64.whl.

File metadata

  • Download URL: kappy-4.0.93-cp35-cp35m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: CPython 3.5m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.3

File hashes

Hashes for kappy-4.0.93-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 facb78507ea0ceb24154133259583939347f501e64b78e24ffaac755c9949dbc
MD5 58f1e14a7c1b140ed49fef271afe66ab
BLAKE2b-256 72d9e971f2024ea2855b1f74c9f2636ae58e0ae00b3725abd20c96dc5556fb2d

See more details on using hashes here.

File details

Details for the file kappy-4.0.93-cp34-cp34m-manylinux1_x86_64.whl.

File metadata

  • Download URL: kappy-4.0.93-cp34-cp34m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: CPython 3.4m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.3

File hashes

Hashes for kappy-4.0.93-cp34-cp34m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 8f1fb39918e046a2b89702bcedb32ab0c8ca8948ec266d5200ab60f4799df57c
MD5 92c33b35b9571adb43ed13667d7c3c1e
BLAKE2b-256 53ac2bf774e9a76e77b9ae7b7766cf3bfeb09fb7625431472cf712938cb09adf

See more details on using hashes here.

File details

Details for the file kappy-4.0.93-cp27-cp27mu-manylinux1_x86_64.whl.

File metadata

  • Download URL: kappy-4.0.93-cp27-cp27mu-manylinux1_x86_64.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: CPython 2.7mu
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.3

File hashes

Hashes for kappy-4.0.93-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 a15524d40854643d4e13449b084ec01341ef1785c570efc2dee0534c58dda532
MD5 efb7ae18bcd2058b0ae7d53cd33b47b2
BLAKE2b-256 3775d3f1f706b1c78b95cb020e3fe375af40c87368db44cb038052474fa4a2c5

See more details on using hashes here.

File details

Details for the file kappy-4.0.93-cp27-cp27m-manylinux1_x86_64.whl.

File metadata

  • Download URL: kappy-4.0.93-cp27-cp27m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 12.4 kB
  • Tags: CPython 2.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.4.2 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.3

File hashes

Hashes for kappy-4.0.93-cp27-cp27m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 ce436a5973d6a1d73c065dd946888d24af1c92fe882009bcc2c16ea950d1e204
MD5 b73673b26e33a8b9fd73f115a29e7ec5
BLAKE2b-256 2e11be27d8d8f7c4c6aaa96ccae7143b24daefe8b6e1c15ee26ca843478681de

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page