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.94.tar.gz
(12.6 kB
view hashes)
Built Distributions
Close
Hashes for kappy-4.0.94-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1b2a17c4cb4559e25a483ef8b532ba734873a913f1263b0f974e8c7df58a0914 |
|
MD5 | 4edecb2c8a9ca39b1cdfcc39a69a23f2 |
|
BLAKE2b-256 | 24f83f422ea409ebdba12e943ce122c074837de3c7d919fd5d579c8beee4822f |
Close
Hashes for kappy-4.0.94-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6886e66048fe918be509e07beb8c2e45267a40c434a9cf93861dbf64a0718524 |
|
MD5 | 9d2c8eb510612c1f10cece6233405ee9 |
|
BLAKE2b-256 | 652dd931479c0af829bf4fee844af382fbce900fdcaa21762d42a9ac3efd436c |
Close
Hashes for kappy-4.0.94-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cf1fe35035d086d67b79e4af5f22e0a612c332623ff9f2302a18e54e0ec5d945 |
|
MD5 | 1b509fa2fbd7a713795497db51141681 |
|
BLAKE2b-256 | 7107081c6661a32b80c2ba24efd686e3e15cdc55f40dea4b4a2935a7a223a950 |
Close
Hashes for kappy-4.0.94-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e9087b7a6ded06155602b6749dbf9085e73132f0cafd6dbe6cdea3fa075ee960 |
|
MD5 | 4ae9846a3d7b10f2ca88de71b268e4ec |
|
BLAKE2b-256 | 91a155b8224cbc9986bbad4b8f0f2dd11892845156b759b3495202d457ca0b73 |
Close
Hashes for kappy-4.0.94-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb115dc34298ed48749f090f46a9237ca4163967ac2282c533cd08654bae944c |
|
MD5 | b49b4479da27fff63103825b4af754d3 |
|
BLAKE2b-256 | 32e94598298dd7d24d2bcefc549675807e53862ae608a953e9182ec9fc51d418 |
Close
Hashes for kappy-4.0.94-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 41404ccf8d301d7539dc596dac1f243238d74ed20c4fc7145d4a81e6d8c7da76 |
|
MD5 | 96aef45465de50b50c2c729366deddc4 |
|
BLAKE2b-256 | 9dab573082c3bc2666f65b8a18c1da83ac3633ef6c7a6ae09f830953c0f15955 |
Close
Hashes for kappy-4.0.94-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a96be5980743beb2d297b72856cb7ccc9ff346e26615377271c44c448ce36352 |
|
MD5 | c5871196bb5e60569a5e77f7eee6d729 |
|
BLAKE2b-256 | aea66101b71958288834aa6fc33c1e360c770d77038c081261cb224dae384457 |
Close
Hashes for kappy-4.0.94-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6a952a093f27e544f32ee9772640053caf266693e7f9b665e8d16fe5594cea39 |
|
MD5 | ed04e9c9b91e26d2857d554619d2a8b1 |
|
BLAKE2b-256 | 3ef978240bfd47ae89f8d4def9bbaa76ddfc972fae0c3c229fb48d7476e00843 |
Close
Hashes for kappy-4.0.94-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 48ad46c072a3c7d9fa74e48c938ffbd10b0498e0d3cd2b930140abc9dd58119b |
|
MD5 | cf7ef5fd9f2e32b2172e08170593e324 |
|
BLAKE2b-256 | dbf0889d3e3103dcfc6890de5ee776ea7e087da0f2766d2e1203748fdc664e4f |
Close
Hashes for kappy-4.0.94-cp34-cp34m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d6847314e36b99b0063bd2e31ea79ba68b6e27ddbd85f5a1c526c0bca796bbe1 |
|
MD5 | 441f9902accc27623f58273a43f1196e |
|
BLAKE2b-256 | 3243b6b18f6de1b4e5acc8fd96ab2110d2b74ca4ece99d9885d7a29bf3897cc4 |
Close
Hashes for kappy-4.0.94-cp27-cp27mu-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a9357513b58676f3f90179e9096f60553b4a437bd5c7b8989ec67e26b009a139 |
|
MD5 | 9c735586e5bc85c5a954db412924c312 |
|
BLAKE2b-256 | 8b975defe402efa9aa4227cc43df0dd2a2f2143346c180ea1284f917fd813cc8 |
Close
Hashes for kappy-4.0.94-cp27-cp27m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 478f3f7df82beda939e8f83c32953a69a8ae8259a140d03b08de95ac19bb11a1 |
|
MD5 | 30e252746bb4726a1c377bb295a5fd92 |
|
BLAKE2b-256 | aebc7831ffa7fc986519b3750d8d72f31898f0487329312267f1f5c41acdd8f8 |
Close
Hashes for kappy-4.0.94-cp27-cp27m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e708c1c2f74626f6403e69556357258581389ee34be4bd4630b3e4f4f686f6ed |
|
MD5 | 753558c2f38972900759b31dac501c6b |
|
BLAKE2b-256 | 37d5b7affd7015478c9a33024ddc28789c0d1f47a8d68020bd6fefbbc63a6624 |