Skip to content

Commit

Permalink
chg: doc: update to latest readme
Browse files Browse the repository at this point in the history
this will remove the README.rst and move the content to README.md

this include

- badge
- recommended installation method
- recommended way for alternative method
- fix link to document on above point
- code markup

it also point to README.md for LONG_DESCRIPTION

Signed-off-by: Rachmadani Haryono <foreturiga@gmail.com>
  • Loading branch information
rachmadaniHaryono committed Nov 23, 2021
1 parent dd26747 commit 9e446ae
Show file tree
Hide file tree
Showing 3 changed files with 39 additions and 82 deletions.
40 changes: 38 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,28 +1,64 @@
PyYAML
======

The next generation YAML parser and emitter for Python.

A full-featured YAML processing framework for Python

[![PyYAML CI](https://github.com/yaml/pyyaml/actions/workflows/ci.yaml/badge.svg)](https://github.com/yaml/pyyaml/actions/workflows/ci.yaml)
[![PyPI version](https://badge.fury.io/py/PyYAML.svg)](https://badge.fury.io/py/PyYAML)

YAML is a data serialization format designed for human readability
and interaction with scripting languages. PyYAML is a YAML parser
and emitter for Python.

PyYAML features a complete YAML 1.1 parser, Unicode support, pickle
support, capable extension API, and sensible error messages. PyYAML
supports standard YAML tags and provides Python-specific tags that
allow to represent an arbitrary Python object.

PyYAML is applicable for a broad range of tasks from complex
configuration files to object serialization and persistence.

## Installation

To install, type `python setup.py install`.
To install, type following:

```shell
# recommended
pip install PyYAML
# or
python setup.py install
```

By default, the `setup.py` script checks whether LibYAML is installed and if
so, builds and installs LibYAML bindings.
To skip the check and force installation of LibYAML bindings, use the option
`--with-libyaml`: `python setup.py --with-libyaml install`.
To disable the check and skip building and installing LibYAML bindings, use
`--without-libyaml`: `python setup.py --without-libyaml install`.
`--without-libyaml`:

```shell
# recommended
python -m pip install pyyaml --global-option=--without-libyaml
# or
python setup.py --without-libyaml install
# Ref: https://pip.pypa.io/en/stable/cli/pip_install/#per-requirement-overrides
```

When LibYAML bindings are installed, you may use fast LibYAML-based parser and
emitter as follows:

```python
>>> yaml.load(stream, Loader=yaml.CLoader)
>>> yaml.dump(data, Dumper=yaml.CDumper)
```

If you don't trust the input YAML stream, you should use:

```python
>>> yaml.safe_load(stream)
```

## Testing

Expand Down
79 changes: 0 additions & 79 deletions README.rst

This file was deleted.

2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
VERSION = '6.0'
DESCRIPTION = "YAML parser and emitter for Python"

with codecs.open('README.rst', encoding='utf-8') as f:
with codecs.open('README.md', encoding='utf-8') as f:
LONG_DESCRIPTION = f.read()

AUTHOR = "Kirill Simonov"
Expand Down

0 comments on commit 9e446ae

Please sign in to comment.