Skip to main content

HER, a new Text Format Build Status

Search informations about the Syntax and Types using the Wiki section.

Content table

What’s HER?

HER is text format, like XML/Json. The difference is that HER is easier than others. Just see:

- Category -
    >> Array[]
    * Array[] = "Umh, that's pretty good!"

Why shall I use HER?

As I said before, HER is simple and easy to use. You can pass informations, or better, store informations* and document them.

Feel the difference:

XML:

<christmas>
    <greetings>Merry christmas!</greetings>
    <greetings>Spam, Python, Eggs</greetings>
</christmas>

HER:

- Christmas -
    >> Greetings[]
    * Greetings[] = "Merry christmas!"
    * Greetings[] = "Spam, Python, Eggs"

Python Module

Installation

You can easily install that module using pip:

pip install her

Or, if you want to upgrade the module:

pip install --upgrade her

Import Module

You must use import her to import all the HER module.

import her
...

Encode a Dictionary

Just use the encode function.

from her import encode
her = encode({'Category':{'hello world':True}})
print(her)

Output:

- Category -
    * hello world = True

Decode a String

Just use the decode function.

from her import decode
dictionary = decode("- Category -\n    * hello world = True")
print(dictionary)

Output:

{'Category':{'hello world':True}}

HER class

You can use the HER class to call less encode & decode functions and optimize your codebase. It updates all its attributes automatically.

x = her.HER()
x.value = {"foo": {"lol": 1}}
print(repr(x.representation)) # Output: '- foo -\n    * lol = 1'

You can also pass a parameter (dict or str):

x = her.HER('- foo -\n    * lol = 1')
print(x.value) # Output: {"foo": {"lol": 1}}

y = her.HER({"foo": {"lol": 1}})
print(repr(x.representation)) # Output: '- foo -\n    * lol = 1'

Metadata

Release files for her 1.5.0

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

Source distribution (sdist)

Source distribution for her 1.5.0
File Size Uploaded Provenance
her-1.5.0.tar.gz 4.8 kB Without provenance Details

Release files / her-1.5.0.tar.gz

Download URL her-1.5.0.tar.gz
Size 4.8 kB
Tags Source
SHA-256 checksum
How to use checksums
d2b50160f405a5d291ae3d9f1103c057df0467751524554653deff46c4438057
BLAKE2b-256 checksum
How to use checksums
abf14522bd18e19c0ce170f1b0e332bc7b08b5dc50eb42aeb443a3879d9d7d94
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.12.1 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.6.3 requests-toolbelt/0.8.0 tqdm/4.29.1 CPython/3.6.7

Security for her 1.5.0

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

1.5.0 This release

1 release file 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