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
Release history Release notifications | RSS feed
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 hashes)
Built Distributions
Close
Hashes for kappy-4.0.92-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 16bcf153715c5ef2f5fd4d30bee2e68a375d168d38e305c3867250239ea22ab6 |
|
MD5 | 4a7f86b8dbd70f69a915ea209eb5f975 |
|
BLAKE2b-256 | 42bd8daa83c0bb0d657e5c1b81e4f152ceb4c03675f4f8544320fef55b104caa |
Close
Hashes for kappy-4.0.92-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fbd87e249d3e65c114dc0162469e5af80f78be928f469b3e50683c2b37238630 |
|
MD5 | 7bdc16767124442285f52e2ef701ddf9 |
|
BLAKE2b-256 | ceabf16970ae00658981d09d796d396a3c7c9136a195b759be4f57e15dc2f69a |
Close
Hashes for kappy-4.0.92-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1934be182a4fd499d3f360195c6a004c49600e5102a4abe274707aa188c1c415 |
|
MD5 | 046b048cee6b8181b1985f3e7d31ecab |
|
BLAKE2b-256 | 526715c2a1728e3f9969fa6890167e6e687b1da026da66212b6a7600c452792f |
Close
Hashes for kappy-4.0.92-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d2688bd346d53810e20848a2db06ef36b99312a547fa639b616cb4146edc26c7 |
|
MD5 | 92fb2fba0e7ddf7b6d8994eaa2cf1e1a |
|
BLAKE2b-256 | a94897912abab8fc696750b071cafe933a7486055e3f0030301a23294318656e |
Close
Hashes for kappy-4.0.92-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 08db98e1de4fcdde1cbf0120f3a766b4899a354135f703615a946dba2c8801a9 |
|
MD5 | cb3cded4be2cf4dee5b91bdbe04f79aa |
|
BLAKE2b-256 | 3199b7ecd0e72253ac3321ea6e4cbb83ffeef22d664f622dc6cbf47816073644 |
Close
Hashes for kappy-4.0.92-cp34-cp34m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6ca467d0d793c83fa736ca446e1df8b6c63281fcc57ad800af1cce4a6b55ddfd |
|
MD5 | 58a3869571525b7c334434cfbf2300d7 |
|
BLAKE2b-256 | 12b923ae0753cea4390bc3b124236014cb6a2a2492d81a503527071bf75fd419 |
Close
Hashes for kappy-4.0.92-cp27-cp27mu-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9c90d8d5f1551576e291c3fb8e1db741196281c4d435c46c5e484cfd400fa1a5 |
|
MD5 | a27877c158558b5a5fad5604619defba |
|
BLAKE2b-256 | 955174467ab35ea20b7d9b9caa3c5e1b5487c5466deb2ae8cde3686163760538 |
Close
Hashes for kappy-4.0.92-cp27-cp27m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | df3a4fdae8b4896bc8686ed9a7859f3c20146d59c44729e0f60f096818ace24b |
|
MD5 | 55c22916652b163a4b140b6adb2c9c29 |
|
BLAKE2b-256 | fc279ed488c281a7a5461bcf84c55c53499ef638e0040ea096406b13c299fdd9 |