semvec/pypi-packages huggingface dataset:
aiopentdb 1.0.0
Async Python wrapper for the OpenTDB API
License: MIT
Requires Python: ~=3.6
Keywords: opentdb aiopentdb trivia

aiopentdb
=========

.. image:: https://img.shields.io/github/workflow/status/CyCanCode/aiopentdb/integeration?label=Integeration&logo=github
   :alt: Integeration
   :target: https://github.com/CyCanCode/aiopentdb/actions?query=workflow%3Aintegeration

.. image:: https://img.shields.io/github/workflow/status/CyCanCode/aiopentdb/deployment?label=Deployment&logo=github
   :alt: Deployment
   :target: https://github.com/CyCanCode/aiopentdb/actions?query=workflow%3Adeployment

.. image:: https://img.shields.io/readthedocs/aiopentdb?label=ReadTheDocs&logo=read%20the%20docs
   :alt: ReadTheDocs
   :target: https://readthedocs.org/projects/aiopentdb/builds

.. image:: https://img.shields.io/pypi/v/aiopentdb?label=PyPI&logo=pypi&logoColor=yellow
   :alt: PyPI
   :target: https://pypi.org/project/aiopentdb/

.. image:: https://img.shields.io/pypi/pyversions/aiopentdb?label=Python&logo=python&logoColor=yellow
   :alt: Python
   :target: https://pypi.org/project/aiopentdb/

.. image:: https://img.shields.io/pypi/l/aiopentdb?label=License
   :alt: License
   :target: https://github.com/CyCanCode/aiopentdb/blob/master/LICENSE

Async Python wrapper for the OpenTDB API

Features
--------

- Full API coverage
- Caching

Installing
----------

Python **3.6** or **higher** is required

.. code-block:: shell

   pip install -U aiopentdb

Quickstart
----------

.. code-block:: python3

   import asyncio
   import aiopentdb

   async def main():
      try:
         client = aiopentdb.Client()
         async for question in client.fetch_questions(amount=5):
               print(question.content)
      finally:
         await client.close()

   asyncio.run(main())
aspars 0.1.0
ASPars allows to parse Answer Sets into python structures
License: MIT

# ASPars

Quick and easy parsing of Answer Sets into friendly python structures.

## Specification

ASPars allows the user to parse answer sets represented in the following formats:
* wasp format, e.g., `{a, b(x), c(y,...,z), ...}`,
* clasp format, e.g., `a b(x) c(y,...,z) ...`.

An answer set is parsed into a list of predicates. A predicate is represented as a dictionary with the following keys:
* `name`: name of the predicate,
* `ext`: a list of the (heterogeneous) values of the predicate,
* `arity`: arity of the predicate (e.g., length of the extension).

If the predicate is an atom, then only `name` is defined.

#### Example
`{a, foo(x), bar(42,"42")}` is parsed into the following singleton:
```python
[
    {'name': 'a'},
    {'name': 'foo', 'ext': ['x'], 'arity': 1},
    {'name': 'bar', 'ext': [42, '"42"'], 'arity': 2}
]
```

## Usage

ASPars can be used by simply importing it or as a standalone module.


### Importing ASPars in a python program
```python
from aspars import ASPars

answer_sets_waspf = [
    '{a, foo(x), bar(-1,1), fizz("42")}',
    '{b, foo(y), bar(-2,2)}',
    '{c, foo(z), fizz("24")}',
]

# parses only the first answer set, returns a singleton
single = ASPars(syntax='wasp').parse(answer_sets_waspf[0])
# parse all the answer sets, returns an iterable (map)
multi = ASPars(syntax='wasp').parse(answer_sets_waspf)

# example in clasp syntax
single = ASPars(syntax='clasp').parse('b foo(y) bar(-2,2)')
```

### Using ASPars as a standalone module
```bash
$ cat my_answer_sets | python -m aspars
```
origo-cli 0.6.0
CLI for services provided by Oslo Origo
License: MIT

# Oslo Origo CLI

Origo CLI provides a unified interface to the services provided by Oslo Origo.

## Resources
* [Documentation at Read the Docs](https://origo-cli.readthedocs.io/)
* [GitHub pages for Origo Dataplatform](https://oslokommune.github.io/dataplattform/)