npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@ccp4/ccp4i2-api

v0.3.4

Published

Shared API contract (auth, api-fetch, request/response types) for CCP4i2 and consumers (CCP4i2 Compounds, third-party integrators)

Readme

@ccp4/ccp4i2-api / ccp4i2-api

Shared API contract for CCP4i2 and consumers (CCP4i2 Compounds, third-party integrators) — auth handshake, api-fetch helpers, and request/response types. 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, 401 response shape, and the typed payloads carried over the authenticated channel.

Status

Draft v0 — published to npm + PyPI from the in-tree workspace. Source of truth lives at packages/ccp4i2-api/ inside the ccp4/ccp4i2 monorepo on the django-sliced branch. The npm scope @ccp4 and the PyPI name ccp4i2-api are CCP4-owned (claimed April 2026); a dedicated ccp4/ccp4i2-api GitHub repo may follow later but is not required while the monorepo hosts the source.

Versions 0.1.00.3.0 were published under the previous name @ccp4/ccp4i2-auth / ccp4i2-auth; the package was renamed at 0.3.0 because its scope had grown beyond auth to cover the broader API contract. The old name is unpublished/yanked; consumers should depend on @ccp4/ccp4i2-api and ccp4i2-api from 0.3.0 onward.

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_api/ | Python source. Installed editable via pip install -e .. | | tests/js/ | TypeScript tests (vitest, when added). | | tests/python/ | Python tests (pytest, when added). |

Consumer wiring

In-monorepo consumers can reference this package by local path for fast iteration; out-of-monorepo consumers pull the published versions.

TypeScript — in-monorepo (client/package.json):

"dependencies": {
  "@ccp4/ccp4i2-api": "file:../packages/ccp4i2-api"
}

(Path depth varies by consumer location.) Out-of-monorepo consumers use the published range, e.g. "@ccp4/ccp4i2-api": "^0.3.0".

Python — in-monorepo (Docker/server/Dockerfile, local dev setup):

pip install -e packages/ccp4i2-api/

Out-of-monorepo consumers pip install ccp4i2-api>=0.3.

Development

# TypeScript
cd packages/ccp4i2-api
npm install
npm run build       # produces lib/
npm run watch       # rebuilds on change

# Python
cd packages/ccp4i2-api
ccp4-python -m pip install -e .
ccp4-python -c "import ccp4i2_api; print(ccp4i2_api.__version__)"