datacurrent 1.0.0__tar.gz → 1.0.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {datacurrent-1.0.0 → datacurrent-1.0.2}/CHANGELOG.md +44 -0
- datacurrent-1.0.2/CONTRIBUTING.md +137 -0
- {datacurrent-1.0.0 → datacurrent-1.0.2}/MANIFEST.in +1 -0
- {datacurrent-1.0.0/datacurrent.egg-info → datacurrent-1.0.2}/PKG-INFO +54 -5
- {datacurrent-1.0.0 → datacurrent-1.0.2}/README.md +48 -4
- {datacurrent-1.0.0 → datacurrent-1.0.2}/datacurrent/_version.py +1 -1
- {datacurrent-1.0.0 → datacurrent-1.0.2/datacurrent.egg-info}/PKG-INFO +54 -5
- {datacurrent-1.0.0 → datacurrent-1.0.2}/datacurrent.egg-info/SOURCES.txt +1 -0
- {datacurrent-1.0.0 → datacurrent-1.0.2}/pyproject.toml +7 -0
- {datacurrent-1.0.0 → datacurrent-1.0.2}/LICENSE +0 -0
- {datacurrent-1.0.0 → datacurrent-1.0.2}/datacurrent/__init__.py +0 -0
- {datacurrent-1.0.0 → datacurrent-1.0.2}/datacurrent/buffering/__init__.py +0 -0
- {datacurrent-1.0.0 → datacurrent-1.0.2}/datacurrent/buffering/backpressure.py +0 -0
- {datacurrent-1.0.0 → datacurrent-1.0.2}/datacurrent/buffering/queue.py +0 -0
- {datacurrent-1.0.0 → datacurrent-1.0.2}/datacurrent/concurrency/__init__.py +0 -0
- {datacurrent-1.0.0 → datacurrent-1.0.2}/datacurrent/concurrency/limits.py +0 -0
- {datacurrent-1.0.0 → datacurrent-1.0.2}/datacurrent/concurrency/tasks.py +0 -0
- {datacurrent-1.0.0 → datacurrent-1.0.2}/datacurrent/config.py +0 -0
- {datacurrent-1.0.0 → datacurrent-1.0.2}/datacurrent/core/__init__.py +0 -0
- {datacurrent-1.0.0 → datacurrent-1.0.2}/datacurrent/core/_util.py +0 -0
- {datacurrent-1.0.0 → datacurrent-1.0.2}/datacurrent/core/lifecycle.py +0 -0
- {datacurrent-1.0.0 → datacurrent-1.0.2}/datacurrent/core/operators.py +0 -0
- {datacurrent-1.0.0 → datacurrent-1.0.2}/datacurrent/core/pipeline.py +0 -0
- {datacurrent-1.0.0 → datacurrent-1.0.2}/datacurrent/core/sink.py +0 -0
- {datacurrent-1.0.0 → datacurrent-1.0.2}/datacurrent/core/stream.py +0 -0
- {datacurrent-1.0.0 → datacurrent-1.0.2}/datacurrent/events/__init__.py +0 -0
- {datacurrent-1.0.0 → datacurrent-1.0.2}/datacurrent/events/bus.py +0 -0
- {datacurrent-1.0.0 → datacurrent-1.0.2}/datacurrent/events/routing.py +0 -0
- {datacurrent-1.0.0 → datacurrent-1.0.2}/datacurrent/events/subscriptions.py +0 -0
- {datacurrent-1.0.0 → datacurrent-1.0.2}/datacurrent/exceptions.py +0 -0
- {datacurrent-1.0.0 → datacurrent-1.0.2}/datacurrent/integrations/__init__.py +0 -0
- {datacurrent-1.0.0 → datacurrent-1.0.2}/datacurrent/integrations/fastapi.py +0 -0
- {datacurrent-1.0.0 → datacurrent-1.0.2}/datacurrent/integrations/starlette.py +0 -0
- {datacurrent-1.0.0 → datacurrent-1.0.2}/datacurrent/observability/__init__.py +0 -0
- {datacurrent-1.0.0 → datacurrent-1.0.2}/datacurrent/observability/logging.py +0 -0
- {datacurrent-1.0.0 → datacurrent-1.0.2}/datacurrent/observability/metrics.py +0 -0
- {datacurrent-1.0.0 → datacurrent-1.0.2}/datacurrent/py.typed +0 -0
- {datacurrent-1.0.0 → datacurrent-1.0.2}/datacurrent/reliability/__init__.py +0 -0
- {datacurrent-1.0.0 → datacurrent-1.0.2}/datacurrent/reliability/retry.py +0 -0
- {datacurrent-1.0.0 → datacurrent-1.0.2}/datacurrent/reliability/timeout.py +0 -0
- {datacurrent-1.0.0 → datacurrent-1.0.2}/datacurrent/transports/__init__.py +0 -0
- {datacurrent-1.0.0 → datacurrent-1.0.2}/datacurrent/transports/_deps.py +0 -0
- {datacurrent-1.0.0 → datacurrent-1.0.2}/datacurrent/transports/base.py +0 -0
- {datacurrent-1.0.0 → datacurrent-1.0.2}/datacurrent/transports/http.py +0 -0
- {datacurrent-1.0.0 → datacurrent-1.0.2}/datacurrent/transports/memory.py +0 -0
- {datacurrent-1.0.0 → datacurrent-1.0.2}/datacurrent/transports/sse.py +0 -0
- {datacurrent-1.0.0 → datacurrent-1.0.2}/datacurrent/transports/websocket.py +0 -0
- {datacurrent-1.0.0 → datacurrent-1.0.2}/datacurrent.egg-info/dependency_links.txt +0 -0
- {datacurrent-1.0.0 → datacurrent-1.0.2}/datacurrent.egg-info/requires.txt +0 -0
- {datacurrent-1.0.0 → datacurrent-1.0.2}/datacurrent.egg-info/top_level.txt +0 -0
- {datacurrent-1.0.0 → datacurrent-1.0.2}/setup.cfg +0 -0
|
@@ -4,6 +4,50 @@ All notable changes to DataCurrent are documented here. The format follows
|
|
|
4
4
|
[Keep a Changelog](https://keepachangelog.com/en/1.1.0/) and the project uses
|
|
5
5
|
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
6
6
|
|
|
7
|
+
## [1.0.2] — 2026-11-13
|
|
8
|
+
|
|
9
|
+
Automation and packaging release. The public API is unchanged.
|
|
10
|
+
|
|
11
|
+
### Added
|
|
12
|
+
|
|
13
|
+
- GitHub Actions CI (`.github/workflows/ci.yml`) running `ruff`, `mypy` and the
|
|
14
|
+
coverage-enforcing test suite on Python 3.11 through 3.14 for every push and
|
|
15
|
+
pull request.
|
|
16
|
+
|
|
17
|
+
### Fixed
|
|
18
|
+
|
|
19
|
+
- The source distribution ships `CONTRIBUTING.md`; the manifest entry was added
|
|
20
|
+
after the 1.0.1 build.
|
|
21
|
+
- The release workflow now skips the PyPI upload when the version is already
|
|
22
|
+
published, instead of failing on a duplicate file.
|
|
23
|
+
|
|
24
|
+
## [1.0.1] — 2026-11-13
|
|
25
|
+
|
|
26
|
+
Documentation, metadata and packaging release. The public API is unchanged.
|
|
27
|
+
|
|
28
|
+
### Added
|
|
29
|
+
|
|
30
|
+
- `CONTRIBUTING.md`: development setup, the check suite, and the release
|
|
31
|
+
process, including PyPI trusted publishing.
|
|
32
|
+
- A "Documented examples" section in the README that maps each of the sixteen
|
|
33
|
+
runnable scripts to the feature it demonstrates.
|
|
34
|
+
- `[project.urls]` in `pyproject.toml`: homepage and repository (GitHub), issues,
|
|
35
|
+
changelog and PyPI.
|
|
36
|
+
- A GitHub Actions release workflow that publishes to PyPI over OIDC, so
|
|
37
|
+
uploads carry a signed provenance attestation.
|
|
38
|
+
|
|
39
|
+
### Fixed
|
|
40
|
+
|
|
41
|
+
- The FastAPI example documented `uvicorn examples.10_fastapi_integration:app`,
|
|
42
|
+
which is not a runnable module path. It now shows the verified commands.
|
|
43
|
+
|
|
44
|
+
### Changed
|
|
45
|
+
|
|
46
|
+
- README links to the GitHub repository, the PyPI homepage and the examples
|
|
47
|
+
directory.
|
|
48
|
+
- The "not published to PyPI" note was removed; the package is on PyPI and this
|
|
49
|
+
is the current release.
|
|
50
|
+
|
|
7
51
|
## [1.0.0] — 2026-11-08
|
|
8
52
|
|
|
9
53
|
First stable release. Built and verified locally; not published to PyPI.
|
|
@@ -0,0 +1,137 @@
|
|
|
1
|
+
# Contributing to DataCurrent
|
|
2
|
+
|
|
3
|
+
Thanks for helping improve DataCurrent. This guide covers setup, the checks your
|
|
4
|
+
change must pass, and how releases are published.
|
|
5
|
+
|
|
6
|
+
- Repository: <https://github.com/CoderProandTester/datacurrent>
|
|
7
|
+
- Issues: <https://github.com/CoderProandTester/datacurrent/issues>
|
|
8
|
+
- PyPI: <https://pypi.org/project/datacurrent/>
|
|
9
|
+
|
|
10
|
+
## Development setup
|
|
11
|
+
|
|
12
|
+
Python 3.11 or newer is required.
|
|
13
|
+
|
|
14
|
+
```bash
|
|
15
|
+
git clone https://github.com/CoderProandTester/datacurrent.git
|
|
16
|
+
cd datacurrent
|
|
17
|
+
python -m venv .venv
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
Activate the environment, then install the package with the development extras:
|
|
21
|
+
|
|
22
|
+
```bash
|
|
23
|
+
# Windows (Git Bash)
|
|
24
|
+
source .venv/Scripts/activate
|
|
25
|
+
# macOS / Linux
|
|
26
|
+
source .venv/bin/activate
|
|
27
|
+
|
|
28
|
+
python -m pip install --upgrade pip
|
|
29
|
+
python -m pip install -e ".[dev]"
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
`dev` pulls in `pytest`, `pytest-asyncio`, `pytest-cov`, `hypothesis`, `build`,
|
|
33
|
+
`twine`, `ruff` and `mypy`.
|
|
34
|
+
|
|
35
|
+
## Before you change anything
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
python scripts/dev.py check # ruff + mypy
|
|
39
|
+
python scripts/dev.py test # full test suite
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
`scripts/dev.py` runs every command with the interpreter that launched it, so it
|
|
43
|
+
always uses the active virtual environment. `python scripts/dev.py --help`
|
|
44
|
+
lists all tasks.
|
|
45
|
+
|
|
46
|
+
## Layout
|
|
47
|
+
|
|
48
|
+
| Path | Contents |
|
|
49
|
+
|---|---|
|
|
50
|
+
| `datacurrent/core/` | `Stream`, operators, pipelines, terminals |
|
|
51
|
+
| `datacurrent/buffering/` | `BoundedQueue`, backpressure policies |
|
|
52
|
+
| `datacurrent/concurrency/` | `ConcurrencyLimiter`, task tracking, `gather_limited` |
|
|
53
|
+
| `datacurrent/reliability/` | retries, timeouts |
|
|
54
|
+
| `datacurrent/transports/` | HTTP, SSE, WebSocket and the transport base |
|
|
55
|
+
| `datacurrent/events/` | `Channel`, `EventBus`, routing |
|
|
56
|
+
| `datacurrent/integrations/` | FastAPI and Starlette helpers |
|
|
57
|
+
| `datacurrent/observability/` | metrics, stats, structured logging |
|
|
58
|
+
| `docs/` | guides and the API reference |
|
|
59
|
+
| `examples/` | sixteen runnable, test-covered scripts |
|
|
60
|
+
| `tests/` | unit, property-based, stress and packaging tests |
|
|
61
|
+
| `benchmarks/` | reproducible micro-benchmarks |
|
|
62
|
+
|
|
63
|
+
## Making a change
|
|
64
|
+
|
|
65
|
+
1. Keep the public API in `datacurrent/__init__.py` and `__all__` in sync when
|
|
66
|
+
you add or remove an export.
|
|
67
|
+
2. Preserve the existing guarantees: laziness, single consumption, bounded
|
|
68
|
+
buffers that block by default, counted drops, and cancellation-safe cleanup.
|
|
69
|
+
3. New behaviour needs tests. The project enforces **100% line and branch
|
|
70
|
+
coverage**, so aim for that before you open a pull request.
|
|
71
|
+
4. Add an example when you add a user-facing feature, and list it in the README
|
|
72
|
+
examples table. Examples must define `async def main()` and run in under 30
|
|
73
|
+
seconds; `tests/unit/test_examples.py` executes every file that does not start
|
|
74
|
+
with `_`.
|
|
75
|
+
5. Update `CHANGELOG.md` under an "Unreleased" or new version heading. The format
|
|
76
|
+
follows [Keep a Changelog](https://keepachangelog.com/en/1.1.0/), and versions
|
|
77
|
+
follow [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
|
78
|
+
|
|
79
|
+
## Checks
|
|
80
|
+
|
|
81
|
+
```bash
|
|
82
|
+
python scripts/dev.py lint # ruff check .
|
|
83
|
+
python scripts/dev.py fmt # ruff format .
|
|
84
|
+
python scripts/dev.py typecheck # mypy
|
|
85
|
+
python scripts/dev.py cov # pytest with coverage (must be 100%)
|
|
86
|
+
python scripts/dev.py examples # just the example scripts
|
|
87
|
+
python scripts/dev.py build # sdist + wheel
|
|
88
|
+
python scripts/dev.py check-dist # twine check dist/*
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
A change is ready when `lint`, `typecheck` and `cov` all pass. Please do not
|
|
92
|
+
weaken assertions, skip tests or add suppressions to get a green run; fix the
|
|
93
|
+
cause instead.
|
|
94
|
+
|
|
95
|
+
## Style
|
|
96
|
+
|
|
97
|
+
- `ruff` with a 100-character line length, targeting Python 3.11 syntax.
|
|
98
|
+
- Full type annotations on public functions; the package ships `py.typed`.
|
|
99
|
+
- Async-first: no blocking I/O on the event loop.
|
|
100
|
+
- Prefer editing existing modules over adding new ones.
|
|
101
|
+
- Comments explain why, not what.
|
|
102
|
+
|
|
103
|
+
## Reporting a bug
|
|
104
|
+
|
|
105
|
+
Open an issue at <https://github.com/CoderProandTester/datacurrent/issues> with
|
|
106
|
+
the version (`python -c "import datacurrent; print(datacurrent.__version__)"`),
|
|
107
|
+
your Python version and platform, a minimal reproduction, and what you expected
|
|
108
|
+
instead. Security issues should be reported privately rather than in a public
|
|
109
|
+
issue.
|
|
110
|
+
|
|
111
|
+
## Release process
|
|
112
|
+
|
|
113
|
+
Versions are read from `datacurrent/_version.py`; that file is the single source
|
|
114
|
+
of truth. Releases are normally published by GitHub Actions with PyPI trusted
|
|
115
|
+
publishing, so the upload carries a signed provenance attestation.
|
|
116
|
+
|
|
117
|
+
```bash
|
|
118
|
+
# 1. Bump the version and document it
|
|
119
|
+
# datacurrent/_version.py -> __version__ = "1.0.2"
|
|
120
|
+
# CHANGELOG.md -> new heading with the date
|
|
121
|
+
|
|
122
|
+
# 2. Verify everything
|
|
123
|
+
python scripts/dev.py release # lint, mypy, tests, build, twine check
|
|
124
|
+
|
|
125
|
+
# 3. Publish
|
|
126
|
+
# Preferred: GitHub Release -> the release workflow uploads to PyPI
|
|
127
|
+
# Fallback: twine upload dist/*
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
Set `TWINE_USERNAME=__token__` and `TWINE_PASSWORD=<PyPI API token>` (or use
|
|
131
|
+
`~/.pypirc`) for the manual path. PyPI rejects re-uploads of an existing version,
|
|
132
|
+
so a failed upload always needs a new version number.
|
|
133
|
+
|
|
134
|
+
## License
|
|
135
|
+
|
|
136
|
+
By contributing you agree that your contributions are licensed under the MIT
|
|
137
|
+
license in `LICENSE`.
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: datacurrent
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.2
|
|
4
4
|
Summary: Python streaming, made simple: async streams, operators, backpressure and real-time transports.
|
|
5
5
|
Author: DataCurrent contributors
|
|
6
6
|
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/CoderProandTester/datacurrent
|
|
8
|
+
Project-URL: Repository, https://github.com/CoderProandTester/datacurrent
|
|
9
|
+
Project-URL: Issues, https://github.com/CoderProandTester/datacurrent/issues
|
|
10
|
+
Project-URL: Changelog, https://github.com/CoderProandTester/datacurrent/blob/main/CHANGELOG.md
|
|
11
|
+
Project-URL: PyPI, https://pypi.org/project/datacurrent/
|
|
7
12
|
Keywords: streaming,async,asyncio,real-time,data pipeline,stream processing,backpressure,reactive,event bus,pubsub,websocket,server-sent events,http streaming,concurrency,observability,http,https
|
|
8
13
|
Classifier: Development Status :: 5 - Production/Stable
|
|
9
14
|
Classifier: Framework :: AsyncIO
|
|
@@ -52,7 +57,15 @@ DataCurrent is a production-ready asynchronous streaming library. It gives you
|
|
|
52
57
|
one consistent API for lists, async generators, queues, WebSockets, Server-Sent
|
|
53
58
|
Events and streaming HTTP responses.
|
|
54
59
|
|
|
55
|
-
**Version 1.0.
|
|
60
|
+
**Version 1.0.2 · Stable / Production**
|
|
61
|
+
|
|
62
|
+
[](https://pypi.org/project/datacurrent/)
|
|
63
|
+
[](https://pypi.org/project/datacurrent/)
|
|
64
|
+
[](https://github.com/CoderProandTester/datacurrent)
|
|
65
|
+
|
|
66
|
+
- **GitHub repository:** <https://github.com/CoderProandTester/datacurrent>
|
|
67
|
+
- **PyPI homepage:** <https://pypi.org/project/datacurrent/>
|
|
68
|
+
- **Examples:** <https://github.com/CoderProandTester/datacurrent/tree/main/examples>
|
|
56
69
|
|
|
57
70
|
- 279 tests passing, with 100% line and branch coverage.
|
|
58
71
|
- Required networking dependencies install automatically.
|
|
@@ -65,7 +78,10 @@ pip install datacurrent
|
|
|
65
78
|
```
|
|
66
79
|
|
|
67
80
|
Python 3.11 or newer is required. `httpx` and `websockets` are installed with the
|
|
68
|
-
package, so HTTP streaming, SSE and WebSocket clients work immediately.
|
|
81
|
+
package, so HTTP streaming, SSE and WebSocket clients work immediately. The
|
|
82
|
+
[`examples/`](https://github.com/CoderProandTester/datacurrent/tree/main/examples)
|
|
83
|
+
directory contains 16 runnable scripts, from a hello-world stream to a WebSocket
|
|
84
|
+
server.
|
|
69
85
|
|
|
70
86
|
Framework helpers are optional:
|
|
71
87
|
|
|
@@ -224,6 +240,39 @@ stream = Stream.from_factory(connect_and_read).retry(
|
|
|
224
240
|
Retries require a replayable source, such as a factory or a list. A consumed
|
|
225
241
|
generator raises `NonReplayableStreamError` instead of silently restarting.
|
|
226
242
|
|
|
243
|
+
## Examples
|
|
244
|
+
|
|
245
|
+
Sixteen runnable scripts live in [`examples/`](https://github.com/CoderProandTester/datacurrent/tree/main/examples).
|
|
246
|
+
Each one is self-contained and is executed by the test suite, so the output you
|
|
247
|
+
see is the output the project verifies.
|
|
248
|
+
|
|
249
|
+
```bash
|
|
250
|
+
python examples/01_hello_stream.py
|
|
251
|
+
python -m pytest tests/unit/test_examples.py -q # run them all
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
| Script | What it demonstrates |
|
|
255
|
+
|---|---|
|
|
256
|
+
| `01_hello_stream.py` | Creating a stream, iterating it, `tap` and terminal operations |
|
|
257
|
+
| `02_transformations.py` | `filter`, `map`, `distinct`, `batch`, `window`, `reduce`, `enumerate` |
|
|
258
|
+
| `03_large_dataset.py` | 100,000 records streamed in batches with bounded memory |
|
|
259
|
+
| `04_filter_events.py` | `EventBus` wildcard topics and multiple handlers |
|
|
260
|
+
| `05_multi_subscriber.py` | `Channel` fan-out to three independent consumers |
|
|
261
|
+
| `06_websocket_client.py` | `WebSocketStream` JSON send/receive against a local echo server |
|
|
262
|
+
| `07_websocket_server.py` | Broadcasting a `Channel` to connected WebSocket clients |
|
|
263
|
+
| `08_sse_client.py` | `SSEStream` event ids, event types and JSON payloads |
|
|
264
|
+
| `09_http_streaming.py` | `HTTPStream` line iteration and raw body streaming |
|
|
265
|
+
| `10_fastapi_integration.py` | Serving a DataCurrent stream as a FastAPI SSE endpoint |
|
|
266
|
+
| `11_backpressure.py` | Bounded queues, producer suspension and counted drops |
|
|
267
|
+
| `12_concurrent_processing.py` | Bounded concurrency with order preserved |
|
|
268
|
+
| `13_retry_recovery.py` | `RetryPolicy`, `recover` and replayable sources |
|
|
269
|
+
| `14_custom_transport.py` | Implementing `StreamTransport` for a custom protocol |
|
|
270
|
+
| `15_realtime_notifications.py` | Routing one event to WebSocket and email consumers |
|
|
271
|
+
| `16_event_pipeline.py` | End-to-end event filtering, mapping and batching |
|
|
272
|
+
|
|
273
|
+
`examples/_servers.py` holds the local HTTP/SSE test servers the networking
|
|
274
|
+
examples use; it is not an example itself.
|
|
275
|
+
|
|
227
276
|
## Why DataCurrent
|
|
228
277
|
|
|
229
278
|
- One model for iterables, queues, HTTP, SSE and WebSockets.
|
|
@@ -242,8 +291,8 @@ in-process streaming layer that works without any of them.
|
|
|
242
291
|
|
|
243
292
|
- Python 3.11+ on asyncio; no Trio or AnyIO backend.
|
|
244
293
|
- In-memory `Channel` and `EventBus` delivery is at most once.
|
|
245
|
-
- No durable broker adapters or OpenTelemetry exporter in
|
|
246
|
-
-
|
|
294
|
+
- No durable broker adapters or OpenTelemetry exporter in this release.
|
|
295
|
+
- The project name is provisional pending trademark clearance.
|
|
247
296
|
|
|
248
297
|
## License
|
|
249
298
|
|
|
@@ -6,7 +6,15 @@ DataCurrent is a production-ready asynchronous streaming library. It gives you
|
|
|
6
6
|
one consistent API for lists, async generators, queues, WebSockets, Server-Sent
|
|
7
7
|
Events and streaming HTTP responses.
|
|
8
8
|
|
|
9
|
-
**Version 1.0.
|
|
9
|
+
**Version 1.0.2 · Stable / Production**
|
|
10
|
+
|
|
11
|
+
[](https://pypi.org/project/datacurrent/)
|
|
12
|
+
[](https://pypi.org/project/datacurrent/)
|
|
13
|
+
[](https://github.com/CoderProandTester/datacurrent)
|
|
14
|
+
|
|
15
|
+
- **GitHub repository:** <https://github.com/CoderProandTester/datacurrent>
|
|
16
|
+
- **PyPI homepage:** <https://pypi.org/project/datacurrent/>
|
|
17
|
+
- **Examples:** <https://github.com/CoderProandTester/datacurrent/tree/main/examples>
|
|
10
18
|
|
|
11
19
|
- 279 tests passing, with 100% line and branch coverage.
|
|
12
20
|
- Required networking dependencies install automatically.
|
|
@@ -19,7 +27,10 @@ pip install datacurrent
|
|
|
19
27
|
```
|
|
20
28
|
|
|
21
29
|
Python 3.11 or newer is required. `httpx` and `websockets` are installed with the
|
|
22
|
-
package, so HTTP streaming, SSE and WebSocket clients work immediately.
|
|
30
|
+
package, so HTTP streaming, SSE and WebSocket clients work immediately. The
|
|
31
|
+
[`examples/`](https://github.com/CoderProandTester/datacurrent/tree/main/examples)
|
|
32
|
+
directory contains 16 runnable scripts, from a hello-world stream to a WebSocket
|
|
33
|
+
server.
|
|
23
34
|
|
|
24
35
|
Framework helpers are optional:
|
|
25
36
|
|
|
@@ -178,6 +189,39 @@ stream = Stream.from_factory(connect_and_read).retry(
|
|
|
178
189
|
Retries require a replayable source, such as a factory or a list. A consumed
|
|
179
190
|
generator raises `NonReplayableStreamError` instead of silently restarting.
|
|
180
191
|
|
|
192
|
+
## Examples
|
|
193
|
+
|
|
194
|
+
Sixteen runnable scripts live in [`examples/`](https://github.com/CoderProandTester/datacurrent/tree/main/examples).
|
|
195
|
+
Each one is self-contained and is executed by the test suite, so the output you
|
|
196
|
+
see is the output the project verifies.
|
|
197
|
+
|
|
198
|
+
```bash
|
|
199
|
+
python examples/01_hello_stream.py
|
|
200
|
+
python -m pytest tests/unit/test_examples.py -q # run them all
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
| Script | What it demonstrates |
|
|
204
|
+
|---|---|
|
|
205
|
+
| `01_hello_stream.py` | Creating a stream, iterating it, `tap` and terminal operations |
|
|
206
|
+
| `02_transformations.py` | `filter`, `map`, `distinct`, `batch`, `window`, `reduce`, `enumerate` |
|
|
207
|
+
| `03_large_dataset.py` | 100,000 records streamed in batches with bounded memory |
|
|
208
|
+
| `04_filter_events.py` | `EventBus` wildcard topics and multiple handlers |
|
|
209
|
+
| `05_multi_subscriber.py` | `Channel` fan-out to three independent consumers |
|
|
210
|
+
| `06_websocket_client.py` | `WebSocketStream` JSON send/receive against a local echo server |
|
|
211
|
+
| `07_websocket_server.py` | Broadcasting a `Channel` to connected WebSocket clients |
|
|
212
|
+
| `08_sse_client.py` | `SSEStream` event ids, event types and JSON payloads |
|
|
213
|
+
| `09_http_streaming.py` | `HTTPStream` line iteration and raw body streaming |
|
|
214
|
+
| `10_fastapi_integration.py` | Serving a DataCurrent stream as a FastAPI SSE endpoint |
|
|
215
|
+
| `11_backpressure.py` | Bounded queues, producer suspension and counted drops |
|
|
216
|
+
| `12_concurrent_processing.py` | Bounded concurrency with order preserved |
|
|
217
|
+
| `13_retry_recovery.py` | `RetryPolicy`, `recover` and replayable sources |
|
|
218
|
+
| `14_custom_transport.py` | Implementing `StreamTransport` for a custom protocol |
|
|
219
|
+
| `15_realtime_notifications.py` | Routing one event to WebSocket and email consumers |
|
|
220
|
+
| `16_event_pipeline.py` | End-to-end event filtering, mapping and batching |
|
|
221
|
+
|
|
222
|
+
`examples/_servers.py` holds the local HTTP/SSE test servers the networking
|
|
223
|
+
examples use; it is not an example itself.
|
|
224
|
+
|
|
181
225
|
## Why DataCurrent
|
|
182
226
|
|
|
183
227
|
- One model for iterables, queues, HTTP, SSE and WebSockets.
|
|
@@ -196,8 +240,8 @@ in-process streaming layer that works without any of them.
|
|
|
196
240
|
|
|
197
241
|
- Python 3.11+ on asyncio; no Trio or AnyIO backend.
|
|
198
242
|
- In-memory `Channel` and `EventBus` delivery is at most once.
|
|
199
|
-
- No durable broker adapters or OpenTelemetry exporter in
|
|
200
|
-
-
|
|
243
|
+
- No durable broker adapters or OpenTelemetry exporter in this release.
|
|
244
|
+
- The project name is provisional pending trademark clearance.
|
|
201
245
|
|
|
202
246
|
## License
|
|
203
247
|
|
|
@@ -1,9 +1,14 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: datacurrent
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.2
|
|
4
4
|
Summary: Python streaming, made simple: async streams, operators, backpressure and real-time transports.
|
|
5
5
|
Author: DataCurrent contributors
|
|
6
6
|
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/CoderProandTester/datacurrent
|
|
8
|
+
Project-URL: Repository, https://github.com/CoderProandTester/datacurrent
|
|
9
|
+
Project-URL: Issues, https://github.com/CoderProandTester/datacurrent/issues
|
|
10
|
+
Project-URL: Changelog, https://github.com/CoderProandTester/datacurrent/blob/main/CHANGELOG.md
|
|
11
|
+
Project-URL: PyPI, https://pypi.org/project/datacurrent/
|
|
7
12
|
Keywords: streaming,async,asyncio,real-time,data pipeline,stream processing,backpressure,reactive,event bus,pubsub,websocket,server-sent events,http streaming,concurrency,observability,http,https
|
|
8
13
|
Classifier: Development Status :: 5 - Production/Stable
|
|
9
14
|
Classifier: Framework :: AsyncIO
|
|
@@ -52,7 +57,15 @@ DataCurrent is a production-ready asynchronous streaming library. It gives you
|
|
|
52
57
|
one consistent API for lists, async generators, queues, WebSockets, Server-Sent
|
|
53
58
|
Events and streaming HTTP responses.
|
|
54
59
|
|
|
55
|
-
**Version 1.0.
|
|
60
|
+
**Version 1.0.2 · Stable / Production**
|
|
61
|
+
|
|
62
|
+
[](https://pypi.org/project/datacurrent/)
|
|
63
|
+
[](https://pypi.org/project/datacurrent/)
|
|
64
|
+
[](https://github.com/CoderProandTester/datacurrent)
|
|
65
|
+
|
|
66
|
+
- **GitHub repository:** <https://github.com/CoderProandTester/datacurrent>
|
|
67
|
+
- **PyPI homepage:** <https://pypi.org/project/datacurrent/>
|
|
68
|
+
- **Examples:** <https://github.com/CoderProandTester/datacurrent/tree/main/examples>
|
|
56
69
|
|
|
57
70
|
- 279 tests passing, with 100% line and branch coverage.
|
|
58
71
|
- Required networking dependencies install automatically.
|
|
@@ -65,7 +78,10 @@ pip install datacurrent
|
|
|
65
78
|
```
|
|
66
79
|
|
|
67
80
|
Python 3.11 or newer is required. `httpx` and `websockets` are installed with the
|
|
68
|
-
package, so HTTP streaming, SSE and WebSocket clients work immediately.
|
|
81
|
+
package, so HTTP streaming, SSE and WebSocket clients work immediately. The
|
|
82
|
+
[`examples/`](https://github.com/CoderProandTester/datacurrent/tree/main/examples)
|
|
83
|
+
directory contains 16 runnable scripts, from a hello-world stream to a WebSocket
|
|
84
|
+
server.
|
|
69
85
|
|
|
70
86
|
Framework helpers are optional:
|
|
71
87
|
|
|
@@ -224,6 +240,39 @@ stream = Stream.from_factory(connect_and_read).retry(
|
|
|
224
240
|
Retries require a replayable source, such as a factory or a list. A consumed
|
|
225
241
|
generator raises `NonReplayableStreamError` instead of silently restarting.
|
|
226
242
|
|
|
243
|
+
## Examples
|
|
244
|
+
|
|
245
|
+
Sixteen runnable scripts live in [`examples/`](https://github.com/CoderProandTester/datacurrent/tree/main/examples).
|
|
246
|
+
Each one is self-contained and is executed by the test suite, so the output you
|
|
247
|
+
see is the output the project verifies.
|
|
248
|
+
|
|
249
|
+
```bash
|
|
250
|
+
python examples/01_hello_stream.py
|
|
251
|
+
python -m pytest tests/unit/test_examples.py -q # run them all
|
|
252
|
+
```
|
|
253
|
+
|
|
254
|
+
| Script | What it demonstrates |
|
|
255
|
+
|---|---|
|
|
256
|
+
| `01_hello_stream.py` | Creating a stream, iterating it, `tap` and terminal operations |
|
|
257
|
+
| `02_transformations.py` | `filter`, `map`, `distinct`, `batch`, `window`, `reduce`, `enumerate` |
|
|
258
|
+
| `03_large_dataset.py` | 100,000 records streamed in batches with bounded memory |
|
|
259
|
+
| `04_filter_events.py` | `EventBus` wildcard topics and multiple handlers |
|
|
260
|
+
| `05_multi_subscriber.py` | `Channel` fan-out to three independent consumers |
|
|
261
|
+
| `06_websocket_client.py` | `WebSocketStream` JSON send/receive against a local echo server |
|
|
262
|
+
| `07_websocket_server.py` | Broadcasting a `Channel` to connected WebSocket clients |
|
|
263
|
+
| `08_sse_client.py` | `SSEStream` event ids, event types and JSON payloads |
|
|
264
|
+
| `09_http_streaming.py` | `HTTPStream` line iteration and raw body streaming |
|
|
265
|
+
| `10_fastapi_integration.py` | Serving a DataCurrent stream as a FastAPI SSE endpoint |
|
|
266
|
+
| `11_backpressure.py` | Bounded queues, producer suspension and counted drops |
|
|
267
|
+
| `12_concurrent_processing.py` | Bounded concurrency with order preserved |
|
|
268
|
+
| `13_retry_recovery.py` | `RetryPolicy`, `recover` and replayable sources |
|
|
269
|
+
| `14_custom_transport.py` | Implementing `StreamTransport` for a custom protocol |
|
|
270
|
+
| `15_realtime_notifications.py` | Routing one event to WebSocket and email consumers |
|
|
271
|
+
| `16_event_pipeline.py` | End-to-end event filtering, mapping and batching |
|
|
272
|
+
|
|
273
|
+
`examples/_servers.py` holds the local HTTP/SSE test servers the networking
|
|
274
|
+
examples use; it is not an example itself.
|
|
275
|
+
|
|
227
276
|
## Why DataCurrent
|
|
228
277
|
|
|
229
278
|
- One model for iterables, queues, HTTP, SSE and WebSockets.
|
|
@@ -242,8 +291,8 @@ in-process streaming layer that works without any of them.
|
|
|
242
291
|
|
|
243
292
|
- Python 3.11+ on asyncio; no Trio or AnyIO backend.
|
|
244
293
|
- In-memory `Channel` and `EventBus` delivery is at most once.
|
|
245
|
-
- No durable broker adapters or OpenTelemetry exporter in
|
|
246
|
-
-
|
|
294
|
+
- No durable broker adapters or OpenTelemetry exporter in this release.
|
|
295
|
+
- The project name is provisional pending trademark clearance.
|
|
247
296
|
|
|
248
297
|
## License
|
|
249
298
|
|
|
@@ -48,6 +48,13 @@ classifiers = [
|
|
|
48
48
|
]
|
|
49
49
|
dependencies = ["httpx>=0.27", "websockets>=12"]
|
|
50
50
|
|
|
51
|
+
[project.urls]
|
|
52
|
+
Homepage = "https://github.com/CoderProandTester/datacurrent"
|
|
53
|
+
Repository = "https://github.com/CoderProandTester/datacurrent"
|
|
54
|
+
Issues = "https://github.com/CoderProandTester/datacurrent/issues"
|
|
55
|
+
Changelog = "https://github.com/CoderProandTester/datacurrent/blob/main/CHANGELOG.md"
|
|
56
|
+
PyPI = "https://pypi.org/project/datacurrent/"
|
|
57
|
+
|
|
51
58
|
[project.optional-dependencies]
|
|
52
59
|
starlette = ["starlette>=0.36"]
|
|
53
60
|
fastapi = ["fastapi>=0.110"]
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|