Skip to main content

databind.yaml

Databind is a library inspired by Jackson-databind to describe and bind data models for object-oriented programming. The databind.yaml module provides functionality to (de-) serialize YAML payloads from/to Python objects.

Note: This module is just a thin wrapper that provides utility functions, combining the functionality of databind.json with PyYAML.

Quickstart

from typing import Optional
from databind.core import datamodel
from databind.yaml import from_str

@datamodel
class Geolocation:
  latitude: float
  longitude: float
  altitude: Optional[float] = None

@datamodel
class ResolvedLocation:
  query: str
  location: Geolocation

london = from_str(ResolvedLocation, '''
query: London
location:
  latitude: 51.507351
  longitude: -0.127758
''')

assert london == ResolvedLocation("London", Geolocation(51.507351, -0.127758))

Copyright © 2020 Niklas Rosenstein

Metadata

Release files for databind.yaml 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for databind.yaml 0.1.3
File Size Uploaded Provenance Actions
databind.yaml-0.1.3.tar.gz 3.6 kB Without provenance Details for databind.yaml-0.1.3.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for databind.yaml 0.1.3
File Interpreter ABI Platform Actions
databind.yaml-0.1.3-py3-none-any.whl Python 3 none any Details for databind.yaml-0.1.3-py3-none-any.whl

Total release size: 7.6 kB

Release files / databind.yaml-0.1.3.tar.gz

Download URL databind.yaml-0.1.3.tar.gz
Size 3.6 kB
Tags Source
SHA-256 checksum
How to use checksums
18f3c2a1e9e2439a601de7240de3be37612b95b5a2ded1d3e1b3804131490e29
BLAKE2b-256 checksum
How to use checksums
3b9974bcd1f8db3f721a83bc085a739a79d6aabd14b6c3dad35af3cd7e86738b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.3

Release files / databind.yaml-0.1.3-py3-none-any.whl

Download URL databind.yaml-0.1.3-py3-none-any.whl
Size 4.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
24d2c6ea7529fc72493005521f3dce4ede4a87fb9ef21e44ce9af89fedaebf37
BLAKE2b-256 checksum
How to use checksums
5db6eeb131addf40f1a729e5f81eaa3bc48abd3e5cba7e022d1ca639d3239be4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.2.0 pkginfo/1.5.0.1 requests/2.24.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.48.2 CPython/3.7.3

Security for databind.yaml 0.1.3

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page