Skip to main content

yaml_serialize

A simple way to store python objects in yaml

Use

from src import yaml_serialize


class MyObject:
    def __init__(self):
        self.name = "Jake"
        self.age = 16
        self.favorite_color = "Green"
        self.mylist = ["hey", "this", "is", "cool"]


my_object = MyObject()
serializer = yaml_serialize.Serialize(my_object)

# Get serialized object as string
my_serialized_object = serializer.get()

# Write serialized object with class name "MyObject.yml"
serializer.write()

# Write serialized object with custom name "MyCoolObject.yml"
serializer.write("MyCoolObject.yml")

Output

_object: !!python/object:__main__.MyObject
  age: 16
  favorite_color: Green
  mylist:
  - hey
  - this
  - is
  - cool
  name: Jake

Release files for yaml-serialize 0.1

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-serialize 0.1
File Size Uploaded
yaml_serialize-0.1.tar.gz 1.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for yaml-serialize 0.1
File Interpreter ABI Platform
yaml_serialize-0.1-py3-none-any.whl Python 3 none any Details

Total release size: 4.0 kB

Release files / yaml_serialize-0.1.tar.gz

Download URL yaml_serialize-0.1.tar.gz
Size 1.9 kB
Tags Source
SHA-256 checksum
How to use checksums
c90e19d045f19320c2f88d33fdafe1d23f709d3e4d43bfa4f0089b056c703ff2
BLAKE2b-256 checksum
How to use checksums
2807fb5af46167fa6a49b32e605b46237973104622246bbebe65e7f8af920542
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.0 requests-toolbelt/0.9.1 tqdm/4.50.1 CPython/3.8.5

Release files / yaml_serialize-0.1-py3-none-any.whl

Download URL yaml_serialize-0.1-py3-none-any.whl
Size 2.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d00e61aad0421d6b09097af285d08ae438c72952a938a38cc9d7131ff509e790
BLAKE2b-256 checksum
How to use checksums
59d81333ee748b2299af3e7df33ecfdc72c4b51118ab4ce7e887d38a0a8bcae4
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.0 requests-toolbelt/0.9.1 tqdm/4.50.1 CPython/3.8.5

Release history Release notifications | RSS feed

This release

0.1 This release

2 release files

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