linearjeph 1.2.0__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.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 LINEARJEPH
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,107 @@
1
+ Metadata-Version: 2.4
2
+ Name: linearjeph
3
+ Version: 1.2.0
4
+ Summary: Revenue forecasting and growth analytics (Prophecy: MRR/ARR projection, churn, feature impact) plus error tracking, performance, logs and cron monitoring for Python apps. Zero dependencies.
5
+ Author-email: LINEARJEPH <support@linearjeph.cc>
6
+ License: MIT
7
+ Project-URL: Homepage, https://linearjeph.cc/prophecy
8
+ Project-URL: Documentation, https://linearjeph.cc/docs/sdk/python
9
+ Project-URL: Prophecy guide, https://linearjeph.cc/docs/sdk/prophecy
10
+ Project-URL: Source, https://github.com/kingtechies/linearjeph-sdk/tree/main/python
11
+ Project-URL: Changelog, https://github.com/kingtechies/linearjeph-sdk/blob/main/python/CHANGELOG.md
12
+ Keywords: revenue-forecasting,mrr,arr,saas-metrics,churn,cohort-analysis,product-analytics,growth-analytics,feature-analytics,forecasting,error-tracking,apm,monitoring,django,flask,fastapi,prophecy,linearjeph
13
+ Classifier: Development Status :: 5 - Production/Stable
14
+ Classifier: Intended Audience :: Developers
15
+ Classifier: License :: OSI Approved :: MIT License
16
+ Classifier: Operating System :: OS Independent
17
+ Classifier: Programming Language :: Python :: 3
18
+ Classifier: Programming Language :: Python :: 3 :: Only
19
+ Classifier: Programming Language :: Python :: 3.8
20
+ Classifier: Programming Language :: Python :: 3.9
21
+ Classifier: Programming Language :: Python :: 3.10
22
+ Classifier: Programming Language :: Python :: 3.11
23
+ Classifier: Programming Language :: Python :: 3.12
24
+ Classifier: Programming Language :: Python :: 3.13
25
+ Classifier: Framework :: Django
26
+ Classifier: Framework :: Flask
27
+ Classifier: Framework :: FastAPI
28
+ Classifier: Topic :: Office/Business :: Financial
29
+ Classifier: Topic :: Scientific/Engineering :: Information Analysis
30
+ Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware
31
+ Classifier: Topic :: Software Development :: Libraries
32
+ Classifier: Topic :: System :: Logging
33
+ Classifier: Topic :: System :: Monitoring
34
+ Classifier: Typing :: Typed
35
+ Requires-Python: >=3.8
36
+ Description-Content-Type: text/markdown
37
+ License-File: LICENSE
38
+ Dynamic: license-file
39
+
40
+ # linearjeph: revenue forecasting, growth analytics and monitoring for Python apps
41
+
42
+ The official Python SDK for [LINEARJEPH](https://linearjeph.cc). One package, no runtime dependencies, Python 3.8+.
43
+
44
+ - **Prophecy** (growth intelligence): track signups, payments, subscriptions and feature use, scan your codebase locally,
45
+ import your history, and get a 12-month **MRR/ARR forecast with P10-P90 ranges**, churn and cohort retention, LTV,
46
+ feature impact (which features earn and which are dead weight), API health, security checks, an indicative valuation
47
+ and a ranked 90-day plan. Statistics and simulation, not guesswork. [See a sample report](https://linearjeph.cc/prophecy).
48
+ - **Maintenance**: error tracking, performance timing, logs, cron heartbeats and dependency reporting.
49
+ - Works with Django, Flask, FastAPI/Starlette and any WSGI or ASGI app.
50
+
51
+ ```
52
+ pip install linearjeph
53
+ ```
54
+
55
+ ## Prophecy quick start
56
+
57
+ ```python
58
+ from linearjeph import prophecy
59
+
60
+ prophecy.init(ingest_key="lj_app_YOUR_KEY", secret_key="ljp_sk_YOUR_SECRET") # secret: server side only
61
+ prophecy.signup(user.id, plan="free", channel="google")
62
+ prophecy.feature("export-pdf", user.id)
63
+ prophecy.payment(user.id, 49.00, "USD", plan="pro")
64
+
65
+ report = prophecy.report()["report"] # the latest projection
66
+ print(report["headline"]["verdict"])
67
+ ```
68
+
69
+ Scan the codebase (sends a manifest of routes, dependencies and infrastructure, never your source code):
70
+ `python -m linearjeph.prophecy scan . --send`. Full guide: https://linearjeph.cc/docs/sdk/prophecy
71
+
72
+ ## Monitoring quick start
73
+
74
+ ```python
75
+ import linearjeph
76
+ linearjeph.init("lj_app_YOUR_KEY", release="1.4.2", environment="production")
77
+ linearjeph.capture_exception() # or let unhandled exceptions be captured automatically
78
+ ```
79
+
80
+ Get the key from Dashboard > Maintenance > your application. The endpoint defaults to `https://linearjeph.cc`.
81
+
82
+ - `capture_message("text")`, `heartbeat("nightly-job", "ok", interval_s=3600)`, `report_packages()`.
83
+ - Cron: `@linearjeph.monitor("nightly", interval_s=86400)` sends ok/error automatically.
84
+ - Performance: `with linearjeph.start_transaction("checkout"): ...`
85
+ - Django: add `"linearjeph.integrations.django.LinearjephMiddleware"` to `MIDDLEWARE`.
86
+ - FastAPI/Starlette: `app.add_middleware(linearjeph.integrations.asgi.LinearjephASGIMiddleware)`.
87
+ - Flask: `linearjeph.integrations.flask.init_app(app)`.
88
+ - Options: `sample_rate`, `traces_sample_rate`, `before_send`, `scrub_keys`, `max_queue`, `retries`, `debug`.
89
+ - Events are sent from a background thread (bounded queue, retry with backoff, 401 stops sending) and flushed at exit. The SDK never raises into your code.
90
+
91
+ Full documentation: `docs/sdk/python.md` in the repository, or https://linearjeph.cc/docs/sdk/python. Tests: `python -m pytest packages/sdk-python`. MIT licensed.
92
+
93
+ ## Prophecy (growth intelligence, $500/month)
94
+
95
+ Tracks users, payments, feature use and API traffic, scans your codebase locally and returns a forecast report. Full guide: https://linearjeph.cc/docs/sdk/prophecy
96
+
97
+ ```python
98
+ from linearjeph import prophecy
99
+ prophecy.init(ingest_key=os.environ["LINEARJEPH_INGEST_KEY"], secret_key=os.environ.get("LINEARJEPH_SECRET_KEY"))
100
+ prophecy.signup(user.id, plan="free", channel="ads")
101
+ prophecy.payment(user.id, 29, "USD", plan="pro")
102
+ prophecy.feature("export-csv", user.id)
103
+ prophecy.send_manifest(prophecy.scan("."))
104
+ report = prophecy.report() # secret key, server side only
105
+ ```
106
+
107
+ Requests: Django `MIDDLEWARE += ["linearjeph.prophecy.django.ProphecyMiddleware"]`, Flask `prophecy.middleware.init_flask(app)`, FastAPI/Starlette `app.add_middleware(prophecy.middleware.ASGIMiddleware)`, any WSGI app `prophecy.middleware.WSGIMiddleware(app)`. CLI: `python -m linearjeph.prophecy scan [dir] [--send]`, `python -m linearjeph.prophecy import events history.csv`. User ids are SHA-256 hashed by default.
@@ -0,0 +1,68 @@
1
+ # linearjeph: revenue forecasting, growth analytics and monitoring for Python apps
2
+
3
+ The official Python SDK for [LINEARJEPH](https://linearjeph.cc). One package, no runtime dependencies, Python 3.8+.
4
+
5
+ - **Prophecy** (growth intelligence): track signups, payments, subscriptions and feature use, scan your codebase locally,
6
+ import your history, and get a 12-month **MRR/ARR forecast with P10-P90 ranges**, churn and cohort retention, LTV,
7
+ feature impact (which features earn and which are dead weight), API health, security checks, an indicative valuation
8
+ and a ranked 90-day plan. Statistics and simulation, not guesswork. [See a sample report](https://linearjeph.cc/prophecy).
9
+ - **Maintenance**: error tracking, performance timing, logs, cron heartbeats and dependency reporting.
10
+ - Works with Django, Flask, FastAPI/Starlette and any WSGI or ASGI app.
11
+
12
+ ```
13
+ pip install linearjeph
14
+ ```
15
+
16
+ ## Prophecy quick start
17
+
18
+ ```python
19
+ from linearjeph import prophecy
20
+
21
+ prophecy.init(ingest_key="lj_app_YOUR_KEY", secret_key="ljp_sk_YOUR_SECRET") # secret: server side only
22
+ prophecy.signup(user.id, plan="free", channel="google")
23
+ prophecy.feature("export-pdf", user.id)
24
+ prophecy.payment(user.id, 49.00, "USD", plan="pro")
25
+
26
+ report = prophecy.report()["report"] # the latest projection
27
+ print(report["headline"]["verdict"])
28
+ ```
29
+
30
+ Scan the codebase (sends a manifest of routes, dependencies and infrastructure, never your source code):
31
+ `python -m linearjeph.prophecy scan . --send`. Full guide: https://linearjeph.cc/docs/sdk/prophecy
32
+
33
+ ## Monitoring quick start
34
+
35
+ ```python
36
+ import linearjeph
37
+ linearjeph.init("lj_app_YOUR_KEY", release="1.4.2", environment="production")
38
+ linearjeph.capture_exception() # or let unhandled exceptions be captured automatically
39
+ ```
40
+
41
+ Get the key from Dashboard > Maintenance > your application. The endpoint defaults to `https://linearjeph.cc`.
42
+
43
+ - `capture_message("text")`, `heartbeat("nightly-job", "ok", interval_s=3600)`, `report_packages()`.
44
+ - Cron: `@linearjeph.monitor("nightly", interval_s=86400)` sends ok/error automatically.
45
+ - Performance: `with linearjeph.start_transaction("checkout"): ...`
46
+ - Django: add `"linearjeph.integrations.django.LinearjephMiddleware"` to `MIDDLEWARE`.
47
+ - FastAPI/Starlette: `app.add_middleware(linearjeph.integrations.asgi.LinearjephASGIMiddleware)`.
48
+ - Flask: `linearjeph.integrations.flask.init_app(app)`.
49
+ - Options: `sample_rate`, `traces_sample_rate`, `before_send`, `scrub_keys`, `max_queue`, `retries`, `debug`.
50
+ - Events are sent from a background thread (bounded queue, retry with backoff, 401 stops sending) and flushed at exit. The SDK never raises into your code.
51
+
52
+ Full documentation: `docs/sdk/python.md` in the repository, or https://linearjeph.cc/docs/sdk/python. Tests: `python -m pytest packages/sdk-python`. MIT licensed.
53
+
54
+ ## Prophecy (growth intelligence, $500/month)
55
+
56
+ Tracks users, payments, feature use and API traffic, scans your codebase locally and returns a forecast report. Full guide: https://linearjeph.cc/docs/sdk/prophecy
57
+
58
+ ```python
59
+ from linearjeph import prophecy
60
+ prophecy.init(ingest_key=os.environ["LINEARJEPH_INGEST_KEY"], secret_key=os.environ.get("LINEARJEPH_SECRET_KEY"))
61
+ prophecy.signup(user.id, plan="free", channel="ads")
62
+ prophecy.payment(user.id, 29, "USD", plan="pro")
63
+ prophecy.feature("export-csv", user.id)
64
+ prophecy.send_manifest(prophecy.scan("."))
65
+ report = prophecy.report() # secret key, server side only
66
+ ```
67
+
68
+ Requests: Django `MIDDLEWARE += ["linearjeph.prophecy.django.ProphecyMiddleware"]`, Flask `prophecy.middleware.init_flask(app)`, FastAPI/Starlette `app.add_middleware(prophecy.middleware.ASGIMiddleware)`, any WSGI app `prophecy.middleware.WSGIMiddleware(app)`. CLI: `python -m linearjeph.prophecy scan [dir] [--send]`, `python -m linearjeph.prophecy import events history.csv`. User ids are SHA-256 hashed by default.
@@ -0,0 +1,55 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "linearjeph"
7
+ version = "1.2.0"
8
+ description = "Revenue forecasting and growth analytics (Prophecy: MRR/ARR projection, churn, feature impact) plus error tracking, performance, logs and cron monitoring for Python apps. Zero dependencies."
9
+ readme = "README.md"
10
+ requires-python = ">=3.8"
11
+ license = { text = "MIT" }
12
+ authors = [{ name = "LINEARJEPH", email = "support@linearjeph.cc" }]
13
+ keywords = ["revenue-forecasting", "mrr", "arr", "saas-metrics", "churn", "cohort-analysis", "product-analytics", "growth-analytics", "feature-analytics", "forecasting", "error-tracking", "apm", "monitoring", "django", "flask", "fastapi", "prophecy", "linearjeph"]
14
+ classifiers = [
15
+ "Development Status :: 5 - Production/Stable",
16
+ "Intended Audience :: Developers",
17
+ "License :: OSI Approved :: MIT License",
18
+ "Operating System :: OS Independent",
19
+ "Programming Language :: Python :: 3",
20
+ "Programming Language :: Python :: 3 :: Only",
21
+ "Programming Language :: Python :: 3.8",
22
+ "Programming Language :: Python :: 3.9",
23
+ "Programming Language :: Python :: 3.10",
24
+ "Programming Language :: Python :: 3.11",
25
+ "Programming Language :: Python :: 3.12",
26
+ "Programming Language :: Python :: 3.13",
27
+ "Framework :: Django",
28
+ "Framework :: Flask",
29
+ "Framework :: FastAPI",
30
+ "Topic :: Office/Business :: Financial",
31
+ "Topic :: Scientific/Engineering :: Information Analysis",
32
+ "Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware",
33
+ "Topic :: Software Development :: Libraries",
34
+ "Topic :: System :: Logging",
35
+ "Topic :: System :: Monitoring",
36
+ "Typing :: Typed",
37
+ ]
38
+ dependencies = []
39
+
40
+ [project.urls]
41
+ Homepage = "https://linearjeph.cc/prophecy"
42
+ Documentation = "https://linearjeph.cc/docs/sdk/python"
43
+ "Prophecy guide" = "https://linearjeph.cc/docs/sdk/prophecy"
44
+ Source = "https://github.com/kingtechies/linearjeph-sdk/tree/main/python"
45
+ Changelog = "https://github.com/kingtechies/linearjeph-sdk/blob/main/python/CHANGELOG.md"
46
+
47
+ [tool.setuptools.packages.find]
48
+ where = ["src"]
49
+
50
+ [tool.setuptools.package-data]
51
+ linearjeph = ["py.typed"]
52
+
53
+ [tool.pytest.ini_options]
54
+ testpaths = ["tests"]
55
+ pythonpath = ["src"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,13 @@
1
+ """LINEARJEPH error tracking, metrics, logs, tracing, cron monitoring and release tracking. Zero dependencies."""
2
+ from .client import (SDK_VERSION, capture_exception, capture_message, capture_transaction, close, flush, heartbeat,
3
+ init, report_packages, scrub, serialize_exception, set_tag, set_user, start_transaction, transaction)
4
+ from .telemetry import (LinearjephHandler, checkin, current_span, deploy, finish_span, gauge, histogram, inject_headers, incr,
5
+ install_logging, log_event, monitor, release, scrub_pii, span, start_span, timer)
6
+ from . import health
7
+ from . import prophecy
8
+
9
+ __all__ = ["init", "close", "flush", "capture_exception", "capture_message", "capture_transaction", "start_transaction",
10
+ "transaction", "heartbeat", "monitor", "checkin", "report_packages", "set_tag", "set_user", "scrub", "scrub_pii",
11
+ "serialize_exception", "incr", "gauge", "histogram", "timer", "log_event", "LinearjephHandler", "install_logging",
12
+ "span", "start_span", "finish_span", "current_span", "inject_headers", "release", "deploy", "health", "prophecy"]
13
+ __version__ = SDK_VERSION