Skip to main content

datasette-enrichments-re2

PyPI Changelog Tests License

Enrich data using regular expressions

Installation

Install this plugin in the same environment as Datasette.

datasette install datasette-enrichments-re2

Usage

This enrichment allows you to run a regular expression against a column and perform one of the following:

  • Execute a search and replace against that column
  • Extract the first matching result and store that in the specified column (adding a column if necessary)
  • Extract all matching results and store them as a JSON array in the specified column. If the regular expression uses named capture groups this will be an array of objects, otherwise it will be an array of strings.
  • Execute a regular expression with named capture groups and store the results in multiple columns, one for each of those named groups

Development

To set up this plugin locally, first checkout the code. Then create a new virtual environment:

cd datasette-enrichments-re2
python3 -m venv venv
source venv/bin/activate

Now install the dependencies and test dependencies:

pip install -e '.[test]'

To run the tests:

pytest

Release files for datasette-enrichments-re2 0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for datasette-enrichments-re2 0.1
File Size Uploaded
datasette-enrichments-re2-0.1.tar.gz 9.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for datasette-enrichments-re2 0.1
File Interpreter ABI Platform
datasette_enrichments_re2-0.1-py3-none-any.whl Python 3 none any Details

Total release size: 17.8 kB

Release files / datasette-enrichments-re2-0.1.tar.gz

Download URL datasette-enrichments-re2-0.1.tar.gz
Size 9.0 kB
Tags Source
SHA-256 checksum
How to use checksums
9fc84c940cca541ab5b697356cdb162a6fc1d46d2097431ceb4e74b3af8d6b5e
BLAKE2b-256 checksum
How to use checksums
f2f8c6251040335b85a5179133fb81d38bc5a388f757cf1c37848363f90de52f
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.0

Release files / datasette_enrichments_re2-0.1-py3-none-any.whl

Download URL datasette_enrichments_re2-0.1-py3-none-any.whl
Size 8.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
08a854ee3d9359e31e9760af036f66c9cc0a47a04bbc79f3aa477be802ce6ca3
BLAKE2b-256 checksum
How to use checksums
7b622faf00138b8700a71522f851513d7b4f646114b777236939c04a45d01c5c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.12.0

Release history Release notifications | RSS feed

This release

0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page