Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

schemasheets

Package Overview
Dependencies
Maintainers
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

schemasheets

Package to author schemas using spreadsheets

  • 0.3.1
  • PyPI
  • Socket score

Maintainers
4

Schemasheets - make datamodels using spreadsheets

Tests PyPI PyPI - Python Version PyPI - License Code style: black

linkml logo google sheets logo

Create a data dictionary / schema for your data using simple spreadsheets - no coding required.

About

Schemasheets is a framework for managing your schema using spreadsheets (Google Sheets, Excel). It works by compiling down to LinkML, which can itself be compiled to a variety of formalisms, or used for different purposes like data validation

Documentation

See the Schema Sheets Manual

Quick Start

pip install schemasheets

You should then be able to run the following commands:

  • sheets2linkml - Convert schemasheets to a LinkML schema
  • linkml2sheets - Convert a LinkML schema to schemasheets
  • sheets2project - Generate an entire set of schema files (JSON-Schema, SHACL, SQL, ...) from Schemasheets

As an example, take a look at the different tabs in the google sheet with ID 1wVoaiFg47aT9YWNeRfTZ8tYHN8s8PAuDx5i2HUcDpvQ

The personinfo tab contains the bulk of the metadata elements:

recordfieldkeymultiplicityrangedescschema.org
> classslotidentifiercardinalityrangedescriptionexact_mappings: {curie_prefix: sdo}
>
idyes1stringany identifieridentifier
descriptionno0..1stringa textual descriptiondescription
Personn/an/an/aa person,living or deadPerson
Personidyes1stringidentifier for a personidentifier
Person, Organizationnameno1stringfull namename
Personageno0..1decimalage in years
Persongenderno0..1decimalage in years
Personhas medical historyno0..*MedicalEventmedical history
Eventgrouping class for events
MedicalEventn/an/an/aa medical encounter
ForProfit
NonProfit

This demonstrator schema contains both record types (e.g Person, MedicalEvent) as well as fields (e.g. id, age, gender)

You can convert this like this:

sheets2linkml --gsheet-id 1wVoaiFg47aT9YWNeRfTZ8tYHN8s8PAuDx5i2HUcDpvQ personinfo types prefixes -o personinfo.yaml

This will generate a LinkML YAML file personinfo.yaml from 3 of the tabs in the google sheet

You can also work directly with TSVs:

wget https://raw.githubusercontent.com/linkml/schemasheets/main/tests/input/personinfo.tsv 
sheets2linkml personinfo.tsv  -o personinfo.yaml

We recommend using COGS to synchronize your google sheets with local files using a git-like mechanism

Examples

Finding out more

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc