semvec/pypi-packages huggingface dataset:
ianalyzer-readers 0.4.0
Utilities for extracting XML, HTML, CSV, XLSX, and RDF data with a common interface
License: MIT
Requires Python: >=3.9

# I-analyzer Readers

[![Python package](https://github.com/CentreForDigitalHumanities/ianalyzer-readers/actions/workflows/python-package.yml/badge.svg)](https://github.com/CentreForDigitalHumanities/ianalyzer-readers/actions/workflows/python-package.yml)
[![Documentation Status](https://readthedocs.org/projects/ianalyzer-readers/badge/?version=latest)](https://ianalyzer-readers.readthedocs.io/en/latest/?badge=latest)

`ianalyzer-readers` is a python module to extract data from XML, HTML, CSV, JSON, XLSX or RDF (Linked Data) files.

This module was originally created for [I-analyzer](https://github.com/CentreForDigitalHumanities/I-analyzer), a web application that extracts data from a variety of datasets, indexes them and presents a search interface. To do this, we wanted a way to extract data from source files without having to write a new script "from scratch" for each dataset, and an API that would work the same regardless of the source file type.

The basic usage is that you will use the utilities in this package to create a "reader" class. You specify what your data looks like, and then call the `documents()` method of the reader to get an iterator of documents - where each document is a flat dictionary of key/value pairs.

## Prerequisites

Requires Python 3.9 or later.

## Contents

[ianalyzer_readers](./ianalyzer_readers/) contains the source code for the package. [tests](./tests/) contains unit tests.

## When to use this package

This package is *not* a replacement for more general-purpose libraries like `csv` or Beautiful Soup - it is a high-level interface on top of those libraries.

Our primary use for this package is to pre-process data for I-analyzer, but you may find other uses for it.

Using this package makes sense if you want to extract data in the shape that it is designed for (i.e., a list of flat dictionaries).

What we find especially useful is that all subclasses of `Reader` have the same interface - regardless of whether they are processing CSV, JSON, XML, HTML, RDF or XLSX data. That common interface is crucial in an application that needs to process corpora from different source types, like I-analyzer.

## Usage

Typical usage of this package would be to make a custom Python class for a dataset from which you want to extract a list of documents. We call this a `Reader`. This package provides the base classes to structure readers, and provides extraction utilities for several file types.

For detailed usage documention and examples, visit [ianalyzer-readers.readthedocs.io](https://ianalyzer-readers.readthedocs.io/en/latest/)

If this site is unavailable, you can also generate the documentation site locally; see the [contributing guide](./CONTRIBUTING.md) for insttructions.

## Licence

This code is shared under an MIT licence. See [LICENSE](./LICENSE) for more information.
ssb-project-cli 1.7.2
SSB Project CLI
License: MIT
Requires Python: >=3.10

# SSB Project CLI

[![PyPI](https://img.shields.io/pypi/v/ssb-project-cli.svg)][pypi status]
[![Status](https://img.shields.io/pypi/status/ssb-project-cli.svg)][pypi status]
[![Python Version](https://img.shields.io/pypi/pyversions/ssb-project-cli)][pypi status]
[![License](https://img.shields.io/pypi/l/ssb-project-cli)][license]

[![Read the documentation](https://img.shields.io/badge/docs-Github%20Pages-purple)](https://statisticsnorway.github.io/ssb-project-cli/)
[![Tests](https://github.com/statisticsnorway/ssb-project-cli/workflows/Tests/badge.svg)][tests]
[![Codecov](https://codecov.io/gh/statisticsnorway/ssb-project-cli/branch/main/graph/badge.svg)][codecov]

[![pre-commit](https://img.shields.io/badge/pre--commit-enabled-brightgreen?logo=pre-commit&logoColor=white)][pre-commit]
[![Black](https://img.shields.io/badge/code%20style-black-000000.svg)][black]

[pypi status]: https://pypi.org/project/ssb-project-cli/
[tests]: https://github.com/statisticsnorway/ssb-project-cli/actions?workflow=Tests
[codecov]: https://app.codecov.io/gh/statisticsnorway/ssb-project-cli
[pre-commit]: https://github.com/pre-commit/pre-commit
[black]: https://github.com/psf/black

## Features

![Help text](/docs/assets/images/cli_help_screenshot.png)

- Create a new project quickly and easily with `ssb-project create`.
- Your colleagues can quickly get started when you share the project with them with `ssb-project build`.
- Includes:
  - Local directory structure
  - Virtual Environment
  - Kernel for use on Jupyter
  - Github repo (if desired)
- The project will follow the most recent SSB guidelines for security and quality.
- It will always be possible to update existing projects as guidelines change.

:sparkles: Now allows specifying _any_ Cookiecutter template which uses Poetry, for example

```shell
ssb-project create my-project --template-git-url https://github.com/cjolowicz/cookiecutter-hypermodern-python
```

## Installation

You can install _SSB Project CLI_ via [pip] from [PyPI]:

```console
pip install ssb-project-cli
```

## Releasing a new version

To release a new version of the CLI, run the following sequence.

```console
git switch --create release main
```

```console
poetry version <version>
```

```console
git commit --message="<project> <version>" pyproject.toml
```

```console
git push origin release
```

## Contributing

### Setup

1. [Install dependencies](https://cookiecutter-hypermodern-python.readthedocs.io/en/latest/guide.html#installation)
1. [Install pre-commit hooks](https://cookiecutter-hypermodern-python.readthedocs.io/en/latest/guide.html#running-pre-commit-from-git)
1. Run tests: `nox -r` ([More information here](https://cookiecutter-hypermodern-python.readthedocs.io/en/latest/guide.html#using-nox))
1. Run the help command: `poetry run ssb-project --help`

## License

Distributed under the terms of the [MIT license][license],
_SSB Project CLI_ is free and open source software.

<!-- github-only -->

[license]: https://github.com/statisticsnorway/ssb-project-cli/blob/main/LICENSE