Skip to main content

Shared type definitions for Neuracore.

Project description

Neuracore Types

Shared type definitions for the Neuracore platform. This package maintains a single source of truth for data types in Python (Pydantic models) and automatically generates TypeScript types.

Overview

  • Python Package: neuracore-types - Pydantic models for Python backend
  • NPM Package: @neuracore/types - TypeScript types for frontend

Installation

Python

pip install neuracore-types

TypeScript/JavaScript

npm install @neuracore/types
# or
yarn add @neuracore/types
# or
pnpm add @neuracore/types

Development

Setup

# Clone the repository
git clone https://github.com/neuracoreai/neuracore_types.git
cd neuracore_types

# Install Python dependencies
pip install -e ".[dev]"

# Install Node dependencies
npm install

Generate TypeScript Types

The TypeScript types are automatically generated from the Python Pydantic models:

npm install json-schema-to-typescript
python scripts/generate_types.py

This will:

  1. Read the Pydantic models from neuracore_types/neuracore_types.py
  2. Generate TypeScript definitions in typescript/neuracore_types.ts
  3. Create an index file at typescript/index.ts

Build TypeScript Package

npm run build

This compiles the TypeScript files to JavaScript and generates type declarations in the dist/ directory.

CI/CD

The repository includes GitHub Actions workflows that:

  1. On every push to main or PR:
    • Automatically generates TypeScript types from Python models
    • Builds and validates both packages
    • Publishes Python package to PyPI
    • Publishes NPM package to npm registry

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

neuracore_types-1.2.2.tar.gz (15.0 kB view details)

Uploaded Source

Built Distribution

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

neuracore_types-1.2.2-py3-none-any.whl (11.1 kB view details)

Uploaded Python 3

File details

Details for the file neuracore_types-1.2.2.tar.gz.

File metadata

  • Download URL: neuracore_types-1.2.2.tar.gz
  • Upload date:
  • Size: 15.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.14

File hashes

Hashes for neuracore_types-1.2.2.tar.gz
Algorithm Hash digest
SHA256 1c34a61fdbecc6f5ce0eafce1be4c390b1a35e5ae86578229ea932faa74ad4cd
MD5 0649f8114d282d2bd9e896ce3b335ea0
BLAKE2b-256 c6b3c80f57a4722d4a3508b187b4a62da5ee55f15b699947da97e5e8280e3f38

See more details on using hashes here.

File details

Details for the file neuracore_types-1.2.2-py3-none-any.whl.

File metadata

File hashes

Hashes for neuracore_types-1.2.2-py3-none-any.whl
Algorithm Hash digest
SHA256 44a5f5819158a48df1eacac2888a2f5c5459f450ef7a872d7cb85aaeb9b3c9ad
MD5 cd6ad1403a1ef90ca71b0b4860bae525
BLAKE2b-256 fd7c8c0a46ba37f81bc5967dd5fd4a3fe2d6ecce5940c9ef29d72bf995675b94

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