semvec/pypi-packages huggingface dataset:
pyrestr 0.1.0
A small Python library for dictionary utilities
Requires Python: >=3.8

# PyRestr

PyRestr is a small Python library for working with dictionaries, strings, and numbers easily.

## Features

- Dictionary utilities
- String utilities
- Number utilities

## Usage Examples

```python
import pyrestr

# Dictionaries
pyrestr.keybyval({"a": 1, "b": 2}, 2)  # returns "b"

# Strings
pyrestr.rev("Python")                   # returns "nohtyP"
pyrestr.titlecase("hello world")       # returns "Hello World"

# Numbers
pyrestr.is_even(10)                     # returns True
pyrestr.factorial(5)                    # returns 120
diffify-lib 0.2.1
Code that is used by the backend and Python APIs for diffify.com
Requires Python: <4.0,>=3.10

# diffify-lib

## For Developers

### Environment set up

From this directory (`./diffify-lib/` in the repository), to load the developer
environment for this package:

- Install `poetry`: `pip install poetry`
- Install the 'dev' dependencies: `poetry install`

Then activate the environment:

```bash
# poetry >= 2
source .venv/bin/activate
# poetry < 2
poetry shell
```

From here you can open VS code, and have the environment preloaded.

### Continuous Integration

We use the JR
[Common CI](https://gitlab.com/jumpingrivers/lib/templates/common-ci) routines
in GitLab CI runs. To update the template, use

```
copier copy https://gitlab.com/jumpingrivers/lib/templates/common-ci .
```

Note that we have additional routines beyond the Common CI core, for running
pytest, mypy and for deploying the package to PyPI.

## Tests

Unit tests can be ran without further set up:

```bash
pytest tests/unit
```

To run the integration tests, you'll need some environment variables defined:

- `S3_KEY_DEV`
- `S3_SECRET_DEV`
- `S3_BUCKET_DEV`
- `S3_URL_DEV`

Contact the diffify devs if you need these secrets. The simplest way to use
these secrets locally is to store them in a file `.dev.env` (do not add this
file to version control) and load that file into your working environment before
running the tests:

```bash
env $(cat .dev.env) pytest tests/unit tests/integration
```

Note that the integration tests will be run in GitLab's CI runners, so you may
not need to have access to these secrets.

### Version numbers

Any pull request that modifies the source code should have an associated version bump to the
package. When this happens you should change the version in two places:

- `[tool.poetry]` section of `pyproject.toml`
- `__version__` declaration in `diffify_lib/__init__.py`

A simple way to keep the version numbers in sync is to use:

```
poetry version patch|minor|major
```

This requires that `poetry-bumpversion` is installed alongside `poetry`.

### Pre-commit hooks

A pre-commit suite is defined in the root of this repository. You are strongly
advised to use these hooks during development. To register the hooks with your
local copy of the repository, run the following (from the repo-root):

```bash
# Install pre-commit itself
pip install pre-commit
# Install the hooks that pre-commit runs
pre-commit install
```

Now, `pre-commit` will run on your code at every commit, maintaining the style
and quality of the code.