Skip to main content

Read schemas from web service, databases, and schema registries in a standard format

Project description

recap

What is Recap?

Recap is a Python library that reads and converts web service schemas, database schemas, and schema registry schemas in a standard way.

Your data passes through web services, databases, message brokers, and object stores. Recap describes these schemas in a single language, regardless of which system your data passes through.

Format

Recap schemas use Recap's type spec. Schemas can be serialized in YAML, TOML, JSON, XML, or any other compatible language. Here’s a YAML example:

type: struct
fields:
  - name: id
    type: int
    bits: 64
    signed: false
  - name: email
    type: string
    bytes: 255

Features

Get Recap schemas for...

Usage

Install Recap:

pip install recap-core

Get a Recap schema from a Protobuf message:

from recap.converters.protobuf import ProtobufConverter

protobuf_schema = """
message Person {
    string name = 1;
}
"""

recap_schema = ProtobufConverter().to_recap(protobuf_schema)

Or a Snowflake table:

import snowflake.connector
from recap.readers.snowflake import SnowflakeReader

with snowflake.connector.connect(...) as conn:
  recap_schema = SnowflakeReader(conn).to_recap("TABLE", "PUBLIC", "TESTDB")

Or Hive's Metastore:

from pymetastore import HMS
from recap.readers.hive_metastore import HiveMetastoreReader

with HMS.create(...) as conn:
  recap_schema = HiveMetastoreReader(conn).to_recap("testdb", "table")

Warning

Recap is still a little baby application. It's going to wake up crying in the middle of the night. It's going to vomit on the floor once in a while. But if you give it some love and care, it'll be worth it. As time goes on, it'll grow up and be more mature. Bear with it.

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

recap-core-0.6.0.tar.gz (35.1 kB view details)

Uploaded Source

Built Distribution

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

recap_core-0.6.0-py3-none-any.whl (21.5 kB view details)

Uploaded Python 3

File details

Details for the file recap-core-0.6.0.tar.gz.

File metadata

  • Download URL: recap-core-0.6.0.tar.gz
  • Upload date:
  • Size: 35.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.7.4 CPython/3.11.4

File hashes

Hashes for recap-core-0.6.0.tar.gz
Algorithm Hash digest
SHA256 d5b24980d27fb07324dd42df0e8bf4325172cabd6401b23371397f30a5b0f47f
MD5 72643a8bb74bcc683e331acdd06b3ff9
BLAKE2b-256 07f6ed22818fc2a9660b2269586c0254d40d8d4464b4e3f717cf736395008b0a

See more details on using hashes here.

File details

Details for the file recap_core-0.6.0-py3-none-any.whl.

File metadata

  • Download URL: recap_core-0.6.0-py3-none-any.whl
  • Upload date:
  • Size: 21.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: pdm/2.7.4 CPython/3.11.4

File hashes

Hashes for recap_core-0.6.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3cd1c3767b37f6f6a25cc6dd8c0eaaad04b2e4369a125674512b8104136e759b
MD5 b7c5d2546992a9c4b5f7fd1788545f43
BLAKE2b-256 a1ae399d3d20786bed1b4cb83d87798a5d6fde60271af08226a703cc8bce31cc

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