Standardized JSON Schema for authoring multi-mission sequences
Project description
seq-json-schema
Standardized JSON Schema for authoring multi-mission sequences. You can read the schema definition here.
You can use our validation site to validate a .seq.json
document against the latest schema.
JavaScript or TypeScript
Install
npm install @nasa-jpl/seq-json-schema --save
Basic Usage
import seqSchema from '@nasa-jpl/seq-json-schema/schema.json' assert { type: 'json' };
console.log(seqSchema);
TypeScript Types
This library also ships with automatically generated TypeScript types from the schema. For example:
import type { Command, SeqJson } from '@nasa-jpl/seq-json-schema/types';
const command: Command = {
args: [],
stem: 'SEND_DATA',
time: { type: 'COMMAND_COMPLETE' },
type: 'command',
};
const seqJson: SeqJson = {
id: 'sequence0',
metadata: {},
steps: [command],
};
console.log(seqJson);
Python
Install
pip install seq-json-schema
Basic Usage
import importlib.resources
import json
with importlib.resources.path('seq-json-schema', 'schema.json') as schemaPath:
file = open(schemaPath)
schema = json.load(file)
print(schema)
Note if you are using a Python version lower than 3.7 you will have to import the schema using the importlib-resources library.
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
seq-json-schema-1.1.0.tar.gz
(7.4 kB
view details)
File details
Details for the file seq-json-schema-1.1.0.tar.gz
.
File metadata
- Download URL: seq-json-schema-1.1.0.tar.gz
- Upload date:
- Size: 7.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.7
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 820f6ddee0709992532c1decfaec0fa3d4b9644a33619409f62e4a1b74deeaf0 |
|
MD5 | 5a474b2ad056fd11915667e3f4a1c7a0 |
|
BLAKE2b-256 | 184b4bab3a17fb5c757bbc317b77904b70f57d7ec0ee627867fa2383006ccb5f |