Metadata-Version: 2.1
Name: udata-tabular-preview
Version: 2.0.2
Summary: A plugin to preview tabular files (CSV, Excel, ...) using csvapi
Home-page: https://github.com/opendatateam/udata-tabular-preview
Author: Open Data Team
Author-email: contact@opendata.team
License: AGPL
Keywords: udata,harvester,Tabular Preview
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Programming Language :: Python
Classifier: Environment :: Web Environment
Classifier: Operating System :: OS Independent
Classifier: Intended Audience :: Developers
Classifier: Topic :: System :: Software Distribution
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.7
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.7
Requires-Dist: udata (>=2.0.0)
Provides-Extra: test
Requires-Dist: mock (==3.0.5) ; extra == 'test'
Requires-Dist: pytest-flask (==0.15.0) ; extra == 'test'
Requires-Dist: pytest-sugar (==0.9.2) ; extra == 'test'
Requires-Dist: pytest (==4.6.3) ; extra == 'test'

# Tabular Preview

A plugin to preview tabular files (CSV, Excel, ...) using [csvapi](https://github.com/opendatateam/csvapi)

## Usage

Install the plugin package in you udata environement:

```bash
pip install udata-tabular-preview
```

Then activate it in your `udata.cfg`:

```python
PLUGINS = ['tabular']
```

## Configuration

You can control this plugin behavior with the following `udata.cfg` parameters:

- **`TABULAR_CSVAPI_URL`**: The URL to your `csvapi` instance (without trailing slash). **ex:** `https://my.csvapi`
- **`TABULAR_UI`**:  Choose the UI displaying previews. You can choose between `csvapi-front` and `dataexplorer`. Default value is `csvapi-front`
- **`TABULAR_ALLOW_REMOTE`**: Whether or not to allow remote resources preview. Default value is `True`
- **`TABULAR_MAX_SIZE`**: Max allowed file size in bytes if defined. Default value is `None`
- **`TABULAR_PAGE_SIZE`**: fetched data page size. Default to `50`


## Development

### JS dependencies

Install JS dependencies with:

```shell
npm install
```

Then you can package these assets with:

```shell
inv assets
```

(You might need to relaunch these commands when you pull upstream changes).

### Python dependencies

Assuming you are in an active virtualenv with `udata` installed and in the current project cloned repository directory, install all dependencies using:

```shell
pip install -e requirements/develop.pip
```

(You might need to relaunch this command when you pull upstream changes).

### Testing

Tests are located into the `tests` folder and be run with:

```shell
inv test
```

### Quality

Code must pass Flake 8 validation and README should be compatible with `PyPI`.
You can check both with:

```shell
inv qa
```

# Changelog

## 2.0.2 (2020-10-16)

- Add a setting for SUPPORTED_MIME_TYPES [#9](https://github.com/opendatateam/udata-tabular-preview/pull/9)

## 2.0.1 (2020-06-17)

- Use extras attributes to enable preview [#8](https://github.com/opendatateam/udata-tabular-preview/pull/8)

## 2.0.0 (2020-03-11)

- Migrate to Python3 [#5](https://github.com/opendatateam/udata-tabular-preview/pull/5)

## 1.0.0 (2018-10-02)

Initial release



