csp 0.8.0
pip install csp
Released:
csp is a high performance reactive stream processing library, written in C++ and Python
Navigation
Verified details
These details have been verified by PyPIMaintainers
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: Apache License
- Author: the csp authors
- Requires: Python >=3.9
-
Provides-Extra:
develop
,showgraph
,slack
,symphony
,test
Classifiers
- Development Status
- Programming Language
Project description
csp
is a high performance reactive stream processing library. The main engine is a C++ complex event graph processor, with bindings exposed into Python. Its key features include switchable simulation/realtime timesteps for both offline and online processing, custom input and output adapters for integration with static and streaming data sources and sinks, and extensible acceleration via customizable C++ nodes for calculations.
The high level goal of csp
is to make writing realtime code simple and performant. Write event driven code once, test it in simulation, then deploy as realtime without any code changes.
Here is a very simple example of a small csp
program to calculate a bid-ask spread. In this example, we use a constant bid and ask, but in the real world you might pipe these directly in from your live streaming data source, or in from your historical data source, without modifications to your core logic.
import csp
from csp import ts
from datetime import datetime
@csp.node
def spread(bid: ts[float], ask: ts[float]) -> ts[float]:
if csp.valid(bid, ask):
return ask - bid
@csp.graph
def my_graph():
bid = csp.const(1.0)
ask = csp.const(2.0)
s = spread(bid, ask)
csp.print('spread', s)
csp.print('bid', bid)
csp.print('ask', ask)
if __name__ == '__main__':
csp.run(my_graph, starttime=datetime.utcnow())
Running this, our output should look like (with some slight variations for current time):
2024-02-07 04:37:13.446548 bid:1.0
2024-02-07 04:37:13.446548 ask:2.0
2024-02-07 04:37:13.446548 spread:1.0
Getting Started
See our wiki!
Development
Check out the contribution guide and local development instructions.
Authors
csp
was developed at Point72 by the High Frequency Algo team, with contributions from users across the firm.
License
This software is licensed under the Apache 2.0 license. See the LICENSE file for details.
Project details
Verified details
These details have been verified by PyPIMaintainers
Unverified details
These details have not been verified by PyPIProject links
Meta
- License: Apache License
- Author: the csp authors
- Requires: Python >=3.9
-
Provides-Extra:
develop
,showgraph
,slack
,symphony
,test
Classifiers
- Development Status
- Programming Language
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
Built Distributions
Uploaded
CPython 3.12
manylinux: glibc 2.28+ x86-64
Uploaded
CPython 3.12
macOS 11.0+ ARM64
Uploaded
CPython 3.12
macOS 10.15+ x86-64
Uploaded
CPython 3.11
manylinux: glibc 2.28+ x86-64
Uploaded
CPython 3.11
macOS 11.0+ ARM64
Uploaded
CPython 3.11
macOS 10.15+ x86-64
Uploaded
CPython 3.10
manylinux: glibc 2.28+ x86-64
Uploaded
CPython 3.10
macOS 11.0+ ARM64
Uploaded
CPython 3.10
macOS 10.15+ x86-64
Uploaded
CPython 3.9
manylinux: glibc 2.28+ x86-64
Uploaded
CPython 3.9
macOS 10.15+ x86-64
File details
Details for the file csp-0.8.0.tar.gz
.
File metadata
- Download URL: csp-0.8.0.tar.gz
- Upload date:
- Size: 786.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 05840c7777d64f9130bbcaad359a578e6bb3749d780bb699f3c6f2939cba047c |
|
MD5 | ab3c1359bf4005658a43f4b9f32facce |
|
BLAKE2b-256 | f7f63f9191ac7614fe8e62eee63d0cf5e73d791d7df6fde4e988bacf1a1f0f94 |
File details
Details for the file csp-0.8.0-cp312-cp312-win_amd64.whl
.
File metadata
- Download URL: csp-0.8.0-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 25.5 MB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e1a0379b6a19f73fb2f9cdda2c268edcc026177be6771fa75bb5d23162f87f53 |
|
MD5 | 8ef6bf5fa9f456cf8eb36b004303ce7b |
|
BLAKE2b-256 | e1a295d12d58cb0ba621df95d5630ebc0888fc9cc076525def20fe220c0e0886 |
File details
Details for the file csp-0.8.0-cp312-cp312-manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: csp-0.8.0-cp312-cp312-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 31.6 MB
- Tags: CPython 3.12, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3621961998b1e9ab46c7f3d6190661134fcf5f7c3bd4fc29533609d2ab37472d |
|
MD5 | 67cd408dbb1308f1b09d25aa66c8b92b |
|
BLAKE2b-256 | fe6141183deb41545d4260604d6ae74c8960bf381eaa4af0ad495c7b6299a937 |
File details
Details for the file csp-0.8.0-cp312-cp312-macosx_11_0_arm64.whl
.
File metadata
- Download URL: csp-0.8.0-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 26.8 MB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | aeafc0ec53bf282180f900e122b78bb2390a2e060d8420cc1b0074749b50d381 |
|
MD5 | 01fb8fa637f14c9134609a92219eecbc |
|
BLAKE2b-256 | 668a25e965a9a695965d20ff2032fb5b35643a1a0b6a41c60d88115daf473701 |
File details
Details for the file csp-0.8.0-cp312-cp312-macosx_10_15_x86_64.whl
.
File metadata
- Download URL: csp-0.8.0-cp312-cp312-macosx_10_15_x86_64.whl
- Upload date:
- Size: 28.0 MB
- Tags: CPython 3.12, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0bd3ff9f8041d831391ab1aa67923c13aa1517b178b831d176a5371a3214cc13 |
|
MD5 | 125962878892b7babf7b11d377f5be2c |
|
BLAKE2b-256 | f2b6aa40cbf536ec24e189073f41ba329c1588fa01bef015a9adf1bee81115b1 |
File details
Details for the file csp-0.8.0-cp311-cp311-win_amd64.whl
.
File metadata
- Download URL: csp-0.8.0-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 25.5 MB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | be0dac209163b1c8338f0c2f6381d57f406b9a58ad1f7eb55ebd1c2370c594de |
|
MD5 | c6b03b9dbbadd720b8b31dfecf5aae24 |
|
BLAKE2b-256 | ffc3d739a5c1648d3ec2f37d5b533b2f0197df8453df4086098b585246e6d489 |
File details
Details for the file csp-0.8.0-cp311-cp311-manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: csp-0.8.0-cp311-cp311-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 31.6 MB
- Tags: CPython 3.11, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 489ae2917a7c04bc8e67ddd7cf26e26e61bfe72a0467df8ea6ccc0f92e9457f3 |
|
MD5 | 956ea494bae51faa89ac1af8b5dd2617 |
|
BLAKE2b-256 | 3b22d5208f99565245ab9fe231dcd4e1be58efedaa5d24d5ecb5b7a5aea624e7 |
File details
Details for the file csp-0.8.0-cp311-cp311-macosx_11_0_arm64.whl
.
File metadata
- Download URL: csp-0.8.0-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 26.8 MB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1199ca1f4b8fd23851b195f9ed99b64bb8d422933bacd4431f30c4d6cb1d5f72 |
|
MD5 | 437717b41ec35eb51425a3b9efeaeb3b |
|
BLAKE2b-256 | 00da5f94ae78afc9381e89fbd1cc49d69e17d573add41de8c4a0e181c3a299c3 |
File details
Details for the file csp-0.8.0-cp311-cp311-macosx_10_15_x86_64.whl
.
File metadata
- Download URL: csp-0.8.0-cp311-cp311-macosx_10_15_x86_64.whl
- Upload date:
- Size: 28.0 MB
- Tags: CPython 3.11, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7a43b4d3d7cb4d450e235617e5b2e9c381047b7c6485ce741fdced07593788ec |
|
MD5 | 5f5d51ca93ca47445016e257fced87a2 |
|
BLAKE2b-256 | a575dc226b564382f69c07fc8fb602d4d6079eb0e07c604f4e01e9eee2f9bd44 |
File details
Details for the file csp-0.8.0-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: csp-0.8.0-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 25.5 MB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e3087d1b3fd71ceb7a239f04ac6c13c53b449a41eb5cbaccd27b071d3c7aec0 |
|
MD5 | 3591cbb28a590993e03ed75bb598d820 |
|
BLAKE2b-256 | e27bacb26dcc1fd43673b650daa4e5c7c72554104ddb935d602647e59dbecd4a |
File details
Details for the file csp-0.8.0-cp310-cp310-manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: csp-0.8.0-cp310-cp310-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 31.6 MB
- Tags: CPython 3.10, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 706326af9bf32037a988283dcad78e80f5522e8ef3b16ecd6d9c4f81a04e4977 |
|
MD5 | bad87f4fcaa1408586b4e0451fa20f5e |
|
BLAKE2b-256 | 74eff8883e455a5e763431b2006bd991ea5f75cc69a481f1cf75993dcb7c7608 |
File details
Details for the file csp-0.8.0-cp310-cp310-macosx_11_0_arm64.whl
.
File metadata
- Download URL: csp-0.8.0-cp310-cp310-macosx_11_0_arm64.whl
- Upload date:
- Size: 26.8 MB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ab2eeeb8141ee2df65bab54ff41a509852a5f2ec9fbfa2c4de1f8a02268f4726 |
|
MD5 | 196fba97798614bb709383ba70fa2b84 |
|
BLAKE2b-256 | 164c16e56b1f43671fed8a24425480a63576352469b16523d2af25b4db67b9e3 |
File details
Details for the file csp-0.8.0-cp310-cp310-macosx_10_15_x86_64.whl
.
File metadata
- Download URL: csp-0.8.0-cp310-cp310-macosx_10_15_x86_64.whl
- Upload date:
- Size: 28.0 MB
- Tags: CPython 3.10, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 47ea14103a6b4bbbc5e095dacdf4132c26624b3974c845e5ebe0c782863cfccf |
|
MD5 | 845b81dab712e27f6f1f11299b54761a |
|
BLAKE2b-256 | 8d44bafa854c84c7419773e092e5affe865351359452761bf92b909fe2dbafe8 |
File details
Details for the file csp-0.8.0-cp39-cp39-win_amd64.whl
.
File metadata
- Download URL: csp-0.8.0-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 25.5 MB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c2def7f3f9ffd63fd20a0375ee3a9ea62591851847cfd04de203030f3cf4c914 |
|
MD5 | 204a523484c32e56ab2bfdc46926c5e2 |
|
BLAKE2b-256 | 59145cd5d4133e7302383083df73c96d20a1283f7787e038daa4f82afbfc3f2f |
File details
Details for the file csp-0.8.0-cp39-cp39-manylinux_2_28_x86_64.whl
.
File metadata
- Download URL: csp-0.8.0-cp39-cp39-manylinux_2_28_x86_64.whl
- Upload date:
- Size: 31.6 MB
- Tags: CPython 3.9, manylinux: glibc 2.28+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f80fca706b4c0a687448919eb5ac19633f243add81f0265d1575a18421cfe6c0 |
|
MD5 | bb7abd8d4d24fc6d9a649751090d70ab |
|
BLAKE2b-256 | dee6cf1ff13cef811690d4d274ef0c31d56f771172654474c6604e555fe5c023 |
File details
Details for the file csp-0.8.0-cp39-cp39-macosx_10_15_x86_64.whl
.
File metadata
- Download URL: csp-0.8.0-cp39-cp39-macosx_10_15_x86_64.whl
- Upload date:
- Size: 28.0 MB
- Tags: CPython 3.9, macOS 10.15+ x86-64
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.11.11
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0207a4e45b93b304374a3b029b8a525afd47615dff78531f50dda38ff544a42a |
|
MD5 | 691bf8213df84d3f999322a930d24d85 |
|
BLAKE2b-256 | ca518b0b1fbaf9e8c09d7a45725fba6e16e26db03c52eaaff0bf977a9606b7f6 |