semvec/pypi-packages huggingface dataset:
Markups 4.1.1
A wrapper around various text markups
Requires Python: >=3.10

.. image:: https://github.com/retext-project/pymarkups/workflows/tests/badge.svg
   :target: https://github.com/retext-project/pymarkups/actions
   :alt: GitHub Actions status
.. image:: https://codecov.io/gh/retext-project/pymarkups/branch/master/graph/badge.svg
   :target: https://codecov.io/gh/retext-project/pymarkups
   :alt: Coverage status
.. image:: https://readthedocs.org/projects/pymarkups/badge/?version=latest
   :target: https://pymarkups.readthedocs.io/en/latest/
   :alt: ReadTheDocs status

This module provides a wrapper around various text markup languages.

Available by default are Markdown_, reStructuredText_, Textile_ and AsciiDoc_,
but you can easily add your own markups.

Usage example:

.. code:: python

  >>> import markups
  >>> markup = markups.get_markup_for_file_name("myfile.rst")
  >>> markup.name
  'reStructuredText'
  >>> markup.attributes[markups.common.SYNTAX_DOCUMENTATION]
  'https://docutils.sourceforge.io/docs/ref/rst/restructuredtext.html'
  >>> text = """
  ... Hello, world!
  ... =============
  ...
  ... This is an example **reStructuredText** document.
  ... """
  >>> result = markup.convert(text)
  >>> result.get_document_title()
  'Hello, world!'
  >>> print(result.get_document_body())  # doctest: +NORMALIZE_WHITESPACE
  <main id="hello-world">
  <h1 class="title" data-posmap="3">Hello, world!</h1>
  <p data-posmap="5">This is an example <strong>reStructuredText</strong> document.</p>
  </main>

.. _Markdown: https://daringfireball.net/projects/markdown/
.. _reStructuredText: https://docutils.sourceforge.io/rst.html
.. _Textile: https://en.wikipedia.org/wiki/Textile_(markup_language)
.. _AsciiDoc: https://asciidoc.org

The release version can be downloaded from PyPI_ or installed using::

  pip install Markups

.. _PyPI: https://pypi.org/project/Markups/

The source code is hosted on GitHub_.

.. _GitHub: https://github.com/retext-project/pymarkups

The documentation is available online_ or can be generated from source by
installing Sphinx_ and running::

  python3 -m sphinx docs build/sphinx/html

.. _online: https://pymarkups.readthedocs.io/en/latest/
.. _Sphinx: https://www.sphinx-doc.org/en/master/
pyfolioclient 0.1.7
A Python client for interacting with FOLIO's APIs.
Requires Python: >=3.9

# pyfolioclient

A Python client for interacting with FOLIO's APIs.

## Prerequisites

- Python 3.9+
- FOLIO Poppy release or newer (requires expiring tokens)

## Configuration

The clients requires:

- An URL to the FOLIO OKAPI (i.e. foliopath/okapi)
- The username of the tenant in FOLIO
- The username of a user with adequate permissions in FOLIO and the password for the user

## Installation

Choose your preferred installation method:

```bash
pip install pyfolioclient
# or
pip3 install pyfolioclient
# or
uv add pyfolioclient
```

## Features

### FolioBaseClient

Features:

- Authentication and token management
- Re-authentication when token expires
- Persistent connections using httpx Client
- Support for all standard HTTP methods (GET, POST, PUT, DELETE)
- Iterator implementation for paginated GET requests
- Resource cleanup through context manager

### FolioClient

Extends FolioBaseClient and provides useful methods for common operations in FOLIO. Provided for convencience. It contains convenience methods for:

- Users
- Inventory
    - Instances
    - Holdings
    - Items
- Circulation
    - Loans
    - Requests
- Data import

## Usage Examples

### FolioBaseClient

```python
from pyfolioclient import FolioBaseClient

with FolioBaseClient(base_url, tenant, user, password) as folio:
    for user in folio.iter_data("/users", key="users", cql_query="username==bob*"):
        print(user)
```

### FolioClient

```python
from pyfolioclient import FolioClient, ItemNotFoundError

with FolioClient(base_url, tenant, user, password) as folio:
    for loan in folio.get_loans("status=Open"):
        print(loan.get("dueDate"))
    
    try:
        folio.delete_user_by_id("dcf1fabc-3165-4099-b5e6-aa74f95dee73")
    except ItemNotFoundError as err:
        print("No matching user")
```

## A note on custom exceptions

A number of custom exceptions have been implemented:

- BadRequestError (HTTP status code 400)
- ItemNotFoundError (HTTP status code 404)
- UnprocessableContentError (HTTP status code 422)

Through experience we have found these useful to be able to handle explicitly and separately, rather than being raised as a general HTTP error. 

## FOLIO API Notes

FOLIO provides two types of endpoints:
1. Business Logic Modules (`/inventory/items`)
2. Storage Modules (`/item-storage/items`)

For detailed information:
- [Business vs Storage Modules](https://folio-org.atlassian.net/wiki/spaces/FOLIOtips/pages/5673472/Understanding+Business+Logic+Modules+versus+Storage+Modules)

FOLIO API endpoints can be queried using the CQL query language. For an introduction refer to:
- [CQL Query Reference](https://github.com/folio-org/raml-module-builder#cql-contextual-query-language)

Note: Query capabilities may be limited to specific JSON response fields.

## Credits

- Developed at Linköping University
- Inspired by [FOLIO-FSE/FolioClient](https://github.com/FOLIO-FSE/FolioClient) by Theodor Tolstoy [@fontanka16](https://github.com/fontanka16)