semvec/pypi-packages huggingface dataset:
circuit-dawg 1.0.1
Pure-python reader for DAWGs (DAFSAs) that were created by dawgdic C++ library or the DAWG Python library. Optimized to run on CircuitPython.
Keywords: circuitPython,DAWG,DAFSA,word list

# Circuit DAWG

This pure-python package provides read-only access for files
created by the [`dawgdic`](https://code.google.com/p/dawgdic/) C++ library and the [`DAWG`](https://github.com/kmike/DAWG) python package. It has been forked from [DAWG-Python](https://github.com/kmike/DAWG-Python) in order to provide support for Circuit Python.

This package is not capable of creating DAWGs. It works with DAWGs built by the [`dawgdic`](https://code.google.com/p/dawgdic/) C++ library or the [`DAWG`](https://github.com/kmike/DAWG) Python extension module. The main purpose of Circuit DAWG is to provide access to DAWGs on a microcontroller without requiring compiled extensions.

## Installation

Clone this repository, or install with pip:

```bash
pip install circuit-dawg
```

## Usage

The aim of `circuit-dawg` is to be API compatible with [`DAWG`](https://github.com/kmike/DAWG) when it is possible.

First, you have to create a dawg using [`DAWG`](https://github.com/kmike/DAWG) module:

    import dawg
    d = dawg.DAWG(data)
    d.save('words.dawg')

And then this dawg can be loaded without requiring C extensions:

    import circuit_dawg
    d = circuit_dawg.DAWG().load('words.dawg')

Please consult [`DAWG`](https://github.com/kmike/DAWG) docs for detailed usage. Some features
(like constructor parameters or `save()` method) are intentionally
unsupported.

## Changes from DAWG Python

Circuit Python has a subset of the functionality of a full Python distribution. There were some built-in array methods from Python used for loading in the DAWG files that aren't present in Circuit Python, so they needed to be re-written.

## Future Goals

### Interact with DAWGs from file without loading into memory

Since Circuit Python is run on microcontrollers, memory is a commodity in very short supply. Loading a large DAWG into memory in order to interact with it is entirely unfeasible. Thus, I plan to make modifications to allow the DAWG to be read directly from the binary file without needing to load it all in.

Contributions are welcome!


## Contributing

Check out the [source code](https://github.com/kbravh/circuit-dawg)
Submit an [issue or suggestion](https://github.com/kbravh/circuit-dawg/issues)

Feel free to submit ideas, bugs or pull requests.

# Authors & Contributors

- [kbravh](https://github.com/kbravh) - <karey.higuera@gmail.com>

Forked from [DAWG-Python](https://github.com/kmike/DAWG-Python) by Mikhail Korobov - <kmike84@gmail.com>

The algorithms are from [`dawgdic`](https://code.google.com/p/dawgdic/) C++ library by Susumu Yata & contributors.

# License

This package is licensed under MIT License.
parserconfig 1.0.0
Plug-n-Play ConfigParser for extensible use cases.
Requires Python: >=3.7

# ParserConfig

ParserConfig initializes ConfigParser in fewer lines of code.

## Installation
Requires Python 3.7+:
```shell
python -m pip install parserconfig
```

## Usage
To follow along, create a `settings.ini` file in your home directory with the following content:
```ini
[tutorial]
username = my_username
password = my_password
bearer_token = my_bearer_token
```

The configuration file can be read using the following code:
```python
from pathlib import Path
from parserconfig import ParserConfig

configuration_file = Path.home().joinpath('settings.ini')
settings = ParserConfig(configuration_file=configuration_file)
```

The `credentials` helper method returns a dictionary containing key/value pairs. This can be leveraged in several ways:
```python
credentials = settings.credentials('username', 'password', section='tutorial')
print(f'{credentials = }. Kwargs unpacking is supported via **credentials')

username, password = credentials.values()
print(f'{username = }, {password = }')
```

The pattern for querying a single value varies slightly: 
```python
bearer_token = settings.credentials('bearer_token', section='tutorial')
print(f'{bearer_token = }. Single value also supports kwargs unpacking via **bearer_token')

bearer = bearer_token.get('bearer_token')
print(f'{bearer = }')

token, *_ = bearer_token.values()
print(f'{token = }')
```

Access to [ConfigParser](https://docs.python.org/3/library/configparser.html) is provided via `configuration_file_parser`, and can be used to enable ExtendedInterpolation:
```python
from configparser import ConfigParser, ExtendedInterpolation

settings.configuration_file_parser = ConfigParser(interpolation=ExtendedInterpolation())
settings.load_configuration_file()
```

### Advanced Usage
- [management_api_tools](https://github.com/Fauxsys/management_api_tools.git) uses parserconfig to insert data into pytest during test execution.
- [offprem](https://github.com/Fauxsys/offprem.git) creates subclasses of parserconfig.

## Local Development and Testing
### Development
Development and testing should be done in a virtual environment.
```shell
$ git clone https://github.com/Fauxsys/parserconfig.git
$ cd parserconfig
$ python -m venv venv --prompt parserconfig
$ source venv/bin/activate
(parserconfig) $ python -m pip install -U pip
```
Install parserconfig locally.
```shell
(parserconfig) $ python -m pip install -e ".[test]"
```

### Testing
You can test any changes locally with pytest.
```shell
(parserconfig) $ python -m pytest --cov=parserconfig 
```

You can also test parserconfig as an installed package.
```shell
(parserconfig) $ python -m tox
```

### Building a wheel
```shell
(parserconfig) $ python -m pip install build
(parserconfig) $ python -m build --wheel
```

There should now be a wheel in the `dist` directory.
```shell
(parserconfig) $ ls -1 dist
parserconfig-1.0.0-py3-none-any.whl
```