semvec/pypi-packages huggingface dataset:
pluvo 0.2.4
Python library to access the Pluvo REST API.
License: MIT
Keywords: REST,API,Pluvo

# Pluvo Python

[![Build Status](http://img.shields.io/travis/wendbv/pluvo-python.svg)](https://travis-ci.org/wendbv/pluvo-python)
[![Coverage Status](http://img.shields.io/coveralls/wendbv/pluvo-python.svg)](https://coveralls.io/r/wendbv/pluvo-python)
[![MIT License](https://img.shields.io/badge/license-MIT-green.svg)](https://tldrlegal.com/license/mit-license)

Python library to access the Pluvo REST API.

## Authentication using client credentials

To access the methods that need authentication with client credentials, for
instance getting data for a specific user:

```python
from pluvo import Pluvo

pluvo = Pluvo(client_id='client_id', client_secret='client_secret')

user = pluvo.get_user(1)
```

## Authentication using token

To access methods that need a token to authenticate.

```python
from pluvo import Pluvo

pluvo = Pluvo(token='token')

user = pluvo.get_user(1)
```

## API list endpoints

Methods for API endpoints that return a list will return a `PluvoGenerator`
instance. The first page of the results is immediately retrieved. The length
of the instance will be the total number of items. The instance implements
an iterator, fetching more pages as nessecary.

See this example with a total of 50 courses in Pluvo.

```python
from pluvo import Pluvo

pluvo = Pluvo(client_id='client_id', client_secret='client_secret')

# Only the first 20 courses and the total number of courses are retrieved.
courses = pluvo.get_courses()

# No extra request is done.
len(courses)  # 50

# Two more pages are retrieved.
list(courses)  # [...]
```

### Altering page size

The default page size of 20 can be changed when instantiating the `Pluvo`
object.

```pluvo
from pluvo import Pluvo

pluvo = Pluvo(
    client_id='client_id', client_secret='client_secret', page_size=50)
```

## API errors

When an API error is encountered an `PluvoAPIException` is raised.

```python
from pluvo import Pluvo, PluvoAPIException

# Not authenticated.
pluvo = Pluvo(client_id='invalid', client_secret='invalid')

try:
    pluvo.get_course(1)
except PluvoAPIException as e:
    e.message  # 'Provided client_id or client_secret are invalid.'
    e.status_code  # 403
    str(e)  # 'HTTP status 403 - Provided client_id or client_secret are invalid.'
```

## General errors

All errors thrown by the library that are not a result of an API error will be
`PluvoException` errors. This is also the base class for `PluvoAPIException`.
Stoichiograph 0.1.2
Spell words with elemental symbols from the periodic table ("He", "Cu", etc).
License: MIT
Keywords: command-line chemistry words fun combinatorics spelling

Stoichiograph - The Elemental Speller
=====================================

Spell words with elemental symbols from the periodic table ("He", "Cu", etc).

.. figure:: https://cloud.githubusercontent.com/assets/5744114/21043177/7c3efe8c-bdaa-11e6-9c1a-22db4de6bb2f.png
    :alt: A list of four words and their elemental spellings

    Some words and their elemental spellings


Usage
-----

.. code-block::

    usage: stoichiograph [-h] [-b BATCH_FILE] [-c] [--debug] [--list-elements]
                         [--export-graph] [-o OUTPUT_FILE] [-s] [-t] [-v] [-V]
                         [words [words ...]]

    Spell words with elemental symbols from the periodic table.

    positional arguments:
      words                 word(s) for which to find elemental spellings

    optional arguments:
      -h, --help            show this help message and exit
      -b BATCH_FILE, --batch-file BATCH_FILE
                            text file containing one word per line
      -c, --clobber         overwrite output file if it exists
      --debug               print debug log
      --list-elements       print list of elemental symbols and exit
      --export-graph        export graph of first word as dot code
      -o OUTPUT_FILE, --output-file OUTPUT_FILE
                            path of output json file
      -s, --sort            sort words by length
      -t, --tuples          display spellings as tuples
      -v, --verbose         print a detailed log
      -V, --version         print version info and exit


Graph Export
------------

Stoichiograph builds a graph to find a word's elemental spellings. Use the
`--export-graph` option to output dot code that `graphviz`_ can use to generate
an image of the graph.

.. code-block:: bash

    $ stoichiograph.py --export-graph cryptographer | dot -Tpng -o cryptographer.png


.. _Graphviz: http://www.graphviz.org/Home.php