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 Distribution

kappy-4.0.92.tar.gz (12.0 kB view details)

Uploaded Source

Built Distributions

kappy-4.0.92-cp37-cp37m-manylinux1_x86_64.whl (8.2 MB view details)

Uploaded CPython 3.7m

kappy-4.0.92-cp37-cp37m-macosx_10_9_x86_64.whl (6.0 MB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

kappy-4.0.92-cp36-cp36m-manylinux1_x86_64.whl (8.2 MB view details)

Uploaded CPython 3.6m

kappy-4.0.92-cp36-cp36m-macosx_10_9_x86_64.whl (6.0 MB view details)

Uploaded CPython 3.6m macOS 10.9+ x86-64

kappy-4.0.92-cp35-cp35m-manylinux1_x86_64.whl (8.2 MB view details)

Uploaded CPython 3.5m

kappy-4.0.92-cp34-cp34m-manylinux1_x86_64.whl (8.2 MB view details)

Uploaded CPython 3.4m

kappy-4.0.92-cp27-cp27mu-manylinux1_x86_64.whl (8.2 MB view details)

Uploaded CPython 2.7mu

kappy-4.0.92-cp27-cp27m-manylinux1_x86_64.whl (8.2 MB view details)

Uploaded CPython 2.7m

File details

Details for the file kappy-4.0.92.tar.gz.

File metadata

  • Download URL: kappy-4.0.92.tar.gz
  • Upload date:
  • Size: 12.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for kappy-4.0.92.tar.gz
Algorithm Hash digest
SHA256 f41ce698280f665f6f5bfee9e2dc11f94b54762273db9d5ead4413ee5fd1929e
MD5 874e88db55698ad87b50e89591a69bde
BLAKE2b-256 d42c147288f222eb9b201cdd14b2008b9b06cfd0bf064a22156ad649867de714

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kappy-4.0.92-cp37-cp37m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 8.2 MB
  • Tags: CPython 3.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for kappy-4.0.92-cp37-cp37m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 16bcf153715c5ef2f5fd4d30bee2e68a375d168d38e305c3867250239ea22ab6
MD5 4a7f86b8dbd70f69a915ea209eb5f975
BLAKE2b-256 42bd8daa83c0bb0d657e5c1b81e4f152ceb4c03675f4f8544320fef55b104caa

See more details on using hashes here.

File details

Details for the file kappy-4.0.92-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: kappy-4.0.92-cp37-cp37m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 6.0 MB
  • Tags: CPython 3.7m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for kappy-4.0.92-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 fbd87e249d3e65c114dc0162469e5af80f78be928f469b3e50683c2b37238630
MD5 7bdc16767124442285f52e2ef701ddf9
BLAKE2b-256 ceabf16970ae00658981d09d796d396a3c7c9136a195b759be4f57e15dc2f69a

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kappy-4.0.92-cp36-cp36m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 8.2 MB
  • Tags: CPython 3.6m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for kappy-4.0.92-cp36-cp36m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 1934be182a4fd499d3f360195c6a004c49600e5102a4abe274707aa188c1c415
MD5 046b048cee6b8181b1985f3e7d31ecab
BLAKE2b-256 526715c2a1728e3f9969fa6890167e6e687b1da026da66212b6a7600c452792f

See more details on using hashes here.

File details

Details for the file kappy-4.0.92-cp36-cp36m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: kappy-4.0.92-cp36-cp36m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 6.0 MB
  • Tags: CPython 3.6m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for kappy-4.0.92-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 d2688bd346d53810e20848a2db06ef36b99312a547fa639b616cb4146edc26c7
MD5 92fb2fba0e7ddf7b6d8994eaa2cf1e1a
BLAKE2b-256 a94897912abab8fc696750b071cafe933a7486055e3f0030301a23294318656e

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kappy-4.0.92-cp35-cp35m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 8.2 MB
  • Tags: CPython 3.5m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for kappy-4.0.92-cp35-cp35m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 08db98e1de4fcdde1cbf0120f3a766b4899a354135f703615a946dba2c8801a9
MD5 cb3cded4be2cf4dee5b91bdbe04f79aa
BLAKE2b-256 3199b7ecd0e72253ac3321ea6e4cbb83ffeef22d664f622dc6cbf47816073644

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kappy-4.0.92-cp34-cp34m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 8.2 MB
  • Tags: CPython 3.4m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for kappy-4.0.92-cp34-cp34m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 6ca467d0d793c83fa736ca446e1df8b6c63281fcc57ad800af1cce4a6b55ddfd
MD5 58a3869571525b7c334434cfbf2300d7
BLAKE2b-256 12b923ae0753cea4390bc3b124236014cb6a2a2492d81a503527071bf75fd419

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kappy-4.0.92-cp27-cp27mu-manylinux1_x86_64.whl
  • Upload date:
  • Size: 8.2 MB
  • Tags: CPython 2.7mu
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for kappy-4.0.92-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 9c90d8d5f1551576e291c3fb8e1db741196281c4d435c46c5e484cfd400fa1a5
MD5 a27877c158558b5a5fad5604619defba
BLAKE2b-256 955174467ab35ea20b7d9b9caa3c5e1b5487c5466deb2ae8cde3686163760538

See more details on using hashes here.

File details

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

File metadata

  • Download URL: kappy-4.0.92-cp27-cp27m-manylinux1_x86_64.whl
  • Upload date:
  • Size: 8.2 MB
  • Tags: CPython 2.7m
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for kappy-4.0.92-cp27-cp27m-manylinux1_x86_64.whl
Algorithm Hash digest
SHA256 df3a4fdae8b4896bc8686ed9a7859f3c20146d59c44729e0f60f096818ace24b
MD5 55c22916652b163a4b140b6adb2c9c29
BLAKE2b-256 fc279ed488c281a7a5461bcf84c55c53499ef638e0040ea096406b13c299fdd9

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