Skip to main content

Yaml Syntax

yaml-syntax to check a YAML file with your own standard for keys or fields.

like you want a YAML file with these keys:

version, service, name

for this you can make a serializer with pydantic to check it:

from pydantic import BaseModel

class MySyntax(BaseModel):
    version:str
    service:str
    name:str

Note: You can use any option of BaseModel to build your own serializer. For example, use Field to create default values ​​for your fields, or use typing to handle required fields, or anything else to make it more advanced.

and for example this is your yaml file:

version: 'v1.0.0'
service: 'aws'
name: 'test'

then you can check this file is correct or not:

from yaml_syntax.syntax import YamlSyntax

yaml = YamlSyntax.from_file(syntax_schema=MySyntax, yaml_file="test.yaml")

now you can use your serialized data:

serialized_data = yaml.serialized_data
print(serialized_data.version)

Metadata

Release files for yaml-syntax 0.0.9

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

Source distribution (sdist)

Source distribution for yaml-syntax 0.0.9
File Size Uploaded Provenance Actions
yaml_syntax-0.0.9.tar.gz 16.7 kB Without provenance Details for yaml_syntax-0.0.9.tar.gz

Built distribution (wheel)

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

Total release size: 33.4 kB

Release files / yaml_syntax-0.0.9.tar.gz

Download URL yaml_syntax-0.0.9.tar.gz
Size 16.7 kB
Tags Source
SHA-256 checksum
How to use checksums
ee95a18b63de42f8cad0520df5f7a5faebb70c2ddfc9421890b7901891bbdc92
BLAKE2b-256 checksum
How to use checksums
345545256d3ea838780904f5db2bf2f9851977d2399af9aa4a2fc8163fc7cf4c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / yaml_syntax-0.0.9-py3-none-any.whl

Download URL yaml_syntax-0.0.9-py3-none-any.whl
Size 16.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d777b981bf9ee9bd86d6d34f5ba07c66e31ad7e38450765bb483f17cefef61ec
BLAKE2b-256 checksum
How to use checksums
b27ccc38a1fd431ed92b3ad4238cff3b002f6f7d08a9cdf6e4a5aa21f3e315a5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Security for yaml-syntax 0.0.9

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.

Release history Release notifications | RSS feed

This release

0.0.9 This release

2 release files No provenance

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