scitex-affairs (scitex-affairs)
One source for business and personal affairs: catalogs, actuals, reports, and optional time-aware scenarios.
Full Documentation · uv pip install scitex-affairs[all]
Problem and Solution
| Problem | Solution |
|---|---|
| Prices drift across spreadsheets, HTML, and apps | Validate one small YAML catalog |
| A year-end subscriber target is incorrectly billed for all 12 months | Interpolate the stock through time and bill monthly averages |
| Month, quarter, and year formats are rebuilt by hand | Derive every period from one canonical monthly pandas report |
| Forecasts crowd out today's facts | Keep scenarios optional and actual observations append-only |
Quick Start
uv pip install scitex-affairs[all]
scitex-affairs config validate
scitex-affairs catalog show --format markdown
Installation
uv pip install scitex-affairs[all]
# Local development
uv pip install -e ~/proj/scitex-affairs
The base package owns the data model and pandas descriptions. The [all]
extra is the normal end-user install: it adds plotting (FigRecipe, Plotly)
and the development tools.
Usage
The default config path is $SCITEX_DIR/affairs/config.yaml, normally
~/.scitex/affairs/config.yaml. The shared scitex-config local-state
primitive resolves it; an explicit --config or
SCITEX_AFFAIRS_CONFIG override remains available.
scitex-affairs config validate
scitex-affairs catalog show --format markdown
scitex-affairs app serve --no-open-browser
from scitex_affairs import catalog_frame, load_config
config = load_config()
catalog = catalog_frame(config)
Forecasts are deliberately optional. If a scenario is useful, point-in-time
customers or subscriptions are stock measures; projects and usage totals are
flow measures. The engine integrates daily values into monthly results
before fiscal-quarter or fiscal-year aggregation.
Prices in Another Currency
A price can be set in its own currency (the SciTeX price list is in USD) while plans and accounts stay in the config's currency. Amounts are converted at a live rate fetched from the declared reference source:
currency: JPY # plans and accounts are kept in yen
fx:
provider: open.er-api.com # ExchangeRate-API, the source scitex.ai also uses
catalog:
- id: subscription-general
name: SciTeX Cloud Standard
direction: revenue
model: recurring
price: {kind: fixed, amount: 39, currency: USD, interval: month, unit: person}
Every converted row records price_currency, fx_rate, fx_as_of and fx_source. A price in another currency without fx.provider is a config error, and a rate that cannot be fetched raises FxError: there is no fallback rate. Converted figures are estimates: actual billing is in the price's own currency, and an amount charged in another currency is set by the card issuer's rate and fees at settlement. scitex_affairs.fx.disclosure(rate, 'en' | 'ja') renders that statement; scitex-affairs scenario report prints it whenever a conversion was used.
Architecture
flowchart LR
C["$SCITEX_DIR/affairs/config.yaml"] --> V[Validated catalog]
P[(PostgreSQL actuals)] --> D[pandas DataFrames]
V --> D
S[Optional stock/flow scenarios] --> D
D --> T[Text / CSV / JSON / HTML]
D --> F[FigRecipe / Plotly]
D --> A[_django / SciTeX Hub]
Figure 1. One validated data layer feeds every reporting surface.
There is one calculation engine. The CLI, plots, standalone app, and Hub adapter render its DataFrames and do not maintain independent prices or formulas.
4 Interfaces
- Python:
load_config,catalog_frame,monthly_report, andsummarize. - CLI:
config,catalog,scenario,observations, andappnoun groups. - SciTeX App: the thin
scitex_affairs._djangostandalone/Hub adapter. - Skills: packaged only under
src/scitex_affairs/_skills/scitex-affairs/.
PostgreSQL Actuals
scitex_affairs.actuals registers the affairs_actuals plugin with
scitex_dev.store. scitex-dev alone resolves the target through
SCITEX_STORE_DSN or the host PostgreSQL service. This package has no SQLite
fallback and contains no deployment hostname or password.
Environment Variables
| Variable | Purpose |
|---|---|
SCITEX_DIR |
Relocate the ecosystem user root from ~/.scitex |
SCITEX_AFFAIRS_CONFIG |
Override the resolved business YAML |
SCITEX_STORE_DSN |
Standard scitex-dev PostgreSQL target override |
Table 1. Environment variables are owned by the package shown in their descriptions.
Development
ruff check .
python -m pytest
python -m build
scitex-app app validate src/scitex_affairs/_django
See CONTRIBUTING.md, CHANGELOG.md, and CLA.md.
Part of SciTeX
scitex-affairs is part of SciTeX.
Four Freedoms for Research
- The freedom to run your research anywhere — your machine, your terms.
- The freedom to study how every step works — from raw data to final manuscript.
- The freedom to redistribute your workflows, not just your papers.
- The freedom to modify any module and share improvements with the community.
AGPL-3.0 — because we believe research infrastructure deserves the same freedoms as the software it runs on.
Metadata
Release files for scitex-affairs 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| scitex_affairs-0.2.0.tar.gz | 8.1 MB | Without provenance | Details for scitex_affairs-0.2.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| scitex_affairs-0.2.0-py3-none-any.whl | Python 3 | none | any | Details for scitex_affairs-0.2.0-py3-none-any.whl |
Total release size: 15.9 MB
Release files / scitex_affairs-0.2.0.tar.gz
| Download URL | scitex_affairs-0.2.0.tar.gz |
|---|---|
| Size | 8.1 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b1a5d4931ad40fd60243902c92b1706b8b2412c42f00be60ad82aef8e780721d
|
|
BLAKE2b-256 checksum How to use checksums |
c44068f1322da248c470b8a716e5bef6c6e47cdc91a5e01876784a55e64d383b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|
Release files / scitex_affairs-0.2.0-py3-none-any.whl
| Download URL | scitex_affairs-0.2.0-py3-none-any.whl |
|---|---|
| Size | 7.8 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
195b912a2c42d2892f1f0c04b42253595d2f717a2b99743beb99ebbde4fbc626
|
|
BLAKE2b-256 checksum How to use checksums |
5b43c2c29d632013227d6193907bd97161b22b4636efc4c419dd139112efebcc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|
Security for scitex-affairs 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.