Skip to main content

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 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

ccp4i2_auth-0.2.0.tar.gz (15.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

ccp4i2_auth-0.2.0-py3-none-any.whl (15.1 kB view details)

Uploaded Python 3

File details

Details for the file ccp4i2_auth-0.2.0.tar.gz.

File metadata

  • Download URL: ccp4i2_auth-0.2.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

Hashes for ccp4i2_auth-0.2.0.tar.gz
Algorithm Hash digest
SHA256 2650a4c6ab07b0b0abcf67ed072c7c774e1ec9579a427164f1a18df5911a85cb
MD5 51b5b7663d917cd60ce9b21138ac8257
BLAKE2b-256 5a2a59e9a030d6cb8bedbb8a953ccdff7d95d0bf7925dfee0f77ba1301f48fd1

See more details on using hashes here.

File details

Details for the file ccp4i2_auth-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: ccp4i2_auth-0.2.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

Hashes for ccp4i2_auth-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 a2b99998abcd531b67b1800fd4d7b5ef99af5d288887c1121ce15efb5bb28e1b
MD5 96ea50067855f5527165a93a58e4fbc4
BLAKE2b-256 e698f1664872c6d3137d4b75e92834f7db7cfaa9cee413539287551d1110e1c1

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page