Shared auth + api-fetch contract for CCP4i2 and consumers
Reason this release was yanked:
Scope chenged and package moved to ccp4i2-api
Project description
@ccp4/ccp4i2-auth / ccp4i2-auth
Shared auth + api-fetch contract for CCP4i2 and consumers (CCP4i2 Compounds, third-party integrators). One package, two language artifacts: TypeScript on the client side (browser, Electron) and Python on the server side (Django middleware, DRF authentication). Both halves agree on the canonical bearer- token format and 401 response shape.
Status
Draft v0 — published to npm + PyPI from the in-tree workspace. The
package will move to its own repo (ccp4/ccp4i2-auth) once the GitHub-side
ask lands; until then the source of truth is
packages/ccp4i2-auth/
inside the ccp4/ccp4i2 monorepo on the django-sliced branch.
Versioning follows semver from 0.x.y onwards. The v0 contract is
documented in
apps/compounds/docs/CCP4I2_SERVICE_CONTRACT.md;
field stability promises take effect from this version.
Layout
| Path | Purpose |
|---|---|
src/ |
TypeScript source. Built to lib/ via npm run build. |
lib/ |
Built TypeScript output. Generated; gitignored. |
dist/ |
Python distribution output (python -m build). Generated; gitignored. Kept distinct from lib/ so twine upload dist/* doesn't accidentally pick up TypeScript artefacts. |
ccp4i2_auth/ |
Python source. Installed editable via pip install -e .. |
tests/js/ |
TypeScript tests (vitest, when added). |
tests/python/ |
Python tests (pytest, when added). |
Consumer wiring
During the monorepo phase, consumers reference this package via local paths.
TypeScript (client/package.json, apps/compounds/frontend/package.json):
"dependencies": {
"@ccp4/ccp4i2-auth": "file:../../packages/ccp4i2-auth"
}
(Path depth varies by consumer location — see each consumer's package.json.)
Python (Docker/server/Dockerfile, local dev setup):
pip install -e packages/ccp4i2-auth/
At repo split, consumers swap file: to a published version (^0.1.0 for
TS, >=0.1 for Python). The package's exports, build artifacts, and
contract are unchanged — only the resolution mechanism switches.
Development
# TypeScript
cd packages/ccp4i2-auth
npm install
npm run build # produces lib/
npm run watch # rebuilds on change
# Python
cd packages/ccp4i2-auth
ccp4-python -m pip install -e .
ccp4-python -c "import ccp4i2_auth; print(ccp4i2_auth.__version__)"
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file ccp4i2_auth-0.1.0.tar.gz.
File metadata
- Download URL: ccp4i2_auth-0.1.0.tar.gz
- Upload date:
- Size: 15.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8946ba21d2be0aebea8bcc25b15680a27a07ccf81a6229b977dc70bd582f996f
|
|
| MD5 |
8bdc84ca6bd7f25d0dbe93102076cdf3
|
|
| BLAKE2b-256 |
3d13891697e022b880934783b94b0f1f79963294b712041ee42f72b80540591b
|
File details
Details for the file ccp4i2_auth-0.1.0-py3-none-any.whl.
File metadata
- Download URL: ccp4i2_auth-0.1.0-py3-none-any.whl
- Upload date:
- Size: 15.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.11
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
48571de88284473da382d5f73e1d3afe0b822798dc86da1557fe6346257b8660
|
|
| MD5 |
15da8f515f157039a512a2316dec963d
|
|
| BLAKE2b-256 |
376b62b2126fd6d0e3915b609fd58c51ba221b6e3b8cc4574b97c1412174195d
|