Skip to main content

Creates dump, dumps, load, and load function for yaml doc based on the json stdlib.

Project description

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml" lang="en">
<head>
<meta charset="utf-8"/>
<title>README.md</title>
<meta name="path" content="README.md"/>
<meta name="author" content="Max Ludden"/>
<meta name="date" content="2022-10-31 7:28 AM EST"/>
<link type="text/css" rel="stylesheet" href="static/style.css"/>
<meta name="url" content="https://github.com/maxludden/maxsetup/README.html ..."/>
<meta name="viewport" content="width=device-width, initial-scale=1">

</head>
<body>

<h1><span class="github">maxludden</span>/<span class="repo">max_yaml</span></h1>

<p>This is a wrapper of PyYAML to make it easier to use. It creates functions similar to the stdlib&#8217;s &#8216;json&#8217; module.</p>

<h3 id="installation">Installation</h3>

<p>max_yaml can be installed from PyPi with your favorite package manager.</p>

<h4>pipx<span style="font-size:0.6em;">(recommended)</span></h4>

<pre><code class="bash">pipx install max_yaml
</code></pre>

<h4 id="pip">pip</h4>

<pre><code class="bash">pip install max_yaml
</code></pre>

<h4 id="poetry">poetry</h4>

<pre><code class="bash">poetry add max_yaml
</code></pre>

<h2 id="usage">Usage</h2>

<p>The helper functions are familiar to any developer familiar with the JSON module from the stdlib:</p>

<pre><code class="python">import max_yaml as yaml

yaml.dump(data, file)

yaml.dumps(data)

yaml.load(file)

yaml.loads(string)
</code></pre>

<p>There are also some helper functions mapped to the Safe Loader and Dumper from the PyYAML library:</p>

<pre><code class="python">import max_yaml as yaml

yaml.safe_dump(data, file)

yaml.safe_dumps(data)

yaml.safe_load(file)

yaml.safe_loads(string)
</code></pre>

<p>All of the functions are taking advantage of the faster <code>C</code> Loaders and Dumpers if they are available. If not, they will fall back to the slower <code>Python</code> versions.</p>

<h2 id="license">License</h2>

<div class="license">
<h4>MIT License</h4>
<p>Copyright (c) 2022 Maxwell Owen Ludden</p>
<p>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p>
<p>copies or substantial portions of the Software.</p>
<p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.</p>
</div>

</body>
</html>

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

max_yaml-0.1.0.tar.gz (3.7 kB view details)

Uploaded Source

Built Distribution

max_yaml-0.1.0-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file max_yaml-0.1.0.tar.gz.

File metadata

  • Download URL: max_yaml-0.1.0.tar.gz
  • Upload date:
  • Size: 3.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.10.8 Darwin/22.1.0

File hashes

Hashes for max_yaml-0.1.0.tar.gz
Algorithm Hash digest
SHA256 b5b9dde9b2926b01b1fec7d6da730abea19e75689d96953e00e85bc0af06ab34
MD5 166897fa447006b7ee44cc0df3243819
BLAKE2b-256 89d49d6873039b276a42d7f6998b502b167f71430abf64c9aba3cbb9296ce8d7

See more details on using hashes here.

File details

Details for the file max_yaml-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: max_yaml-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.2.2 CPython/3.10.8 Darwin/22.1.0

File hashes

Hashes for max_yaml-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 40eec140237054f70ef900d9d1fa10224196c32e1414f3b1a5b7361945f6090b
MD5 ebe4cf38350abd1b2b8c0a138e948f31
BLAKE2b-256 44d018c8dc56de6714b0c35d61ae23df3d68ce09a60556100fb97729e22213ca

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page