semvec/pypi-packages huggingface dataset:
bigquery-erd 0.1.1
Building Entity Relationship Diagrams for Google BigQuery.
License: MIT
Requires Python: >=3.8,<4.0

# bigquery-erd

Entity Relationship Diagram (ERD) Generator for Google BigQuery, based upon [eralchemy](https://github.com/Alexis-benoist/eralchemy).

## Examples

ERD for a NewsMeme database schema (taken from the original project).

![NewsMeme Example](./examples/newsmeme.png)

## Installation

```sh
pip install bigquery-erd
```

`eralchemy` requires [GraphViz](http://www.graphviz.org/download) to generate the graphs and Python. Both are available for Windows, Mac and Linux.

## Usage

### Usage from Python

Find an example notebook [here](./notebooks/example.py).

## But Wait, BigQuey is not a Relation Database?

That's right. You cannot enforce primary or foreign key constraints in BigQuery. However, that doesn't mean that you should not be able to have logical dependencies between tables.

### Defining Relations through Column Descriptions

We use the column description field in BigQuery to define relations between columns in a format that we can later parse programmatically.

Let's assume we have a table `a` with a column `id` and another table `a` with a column `a_id` that serves as a foreign key relation to `a.id`.
We then add the following description to `b.a_id`:

```
-> b.id
```

### Defining Relations to Datasets Explicitly

Per default, we assume that the related tables are located inside the same dataset. However, you can also define the datasets explicitly. This is especially useful if the two related tables are not located within the same dataset.

Let's assume that table `a` is located in dataset `d1` and table `b` is located in `d2`.
The description in `b.a_id` would then be:

```
-> d1.a.id
```

### Defining Cardinality Explicitly

Cardinality defines the relationship between two tables. This package understands four different cardinalities:

- `*`, meaning "0..N"
- `?`, meaning "{0,1}"
- `+`, meaning "1..N"
- `1`, meaning "1"

Per default, we assume a cardinality of `*:1`. You can also define the relation's cardinality explicitly.

Let's assume that every record in `a` has at least 1 related record in `b`.
the description in `b.a_id` would be:

```
-> +:1 a.id
```

### Example

You can find a example Google BigQuery project for the NewsMeme schema with annotated descriptions [here](https://console.cloud.google.com/bigquery?project=test-project-jjagusch&p=test-project-jjagusch&d=newsmeme&page=dataset).

### Defining Custom Description RegEx

The default RegEx for relations in column descriptions is `->\s([?*+1 ]:[?*+1 ]\s)?(.*\.)?(.*)\.(.*)$`. You can define a custom RegEx by setting the `GBQ_RELATION_PATTERN` environment variable.
The RegEx should match four capture groups, where:

- The first group is the cardinality (which is optional)
- The second group is the dataset id (which is optional)
- The third group is the table id
- The fourth group is the column
fa-common 0.12.4
FastAPI Common Framework
License: MIT
Requires Python: >=3.5, <4

# FastAPI Common Framework

[![PyPI version](https://badge.fury.io/py/fa-common.svg)](https://badge.fury.io/py/fa-common)
[![coverage report](https://gitlab.com/csiro-geoanalytics/python-shared/fastapi-common-framework/badges/master/coverage.svg)](https://gitlab.com/csiro-geoanalytics/python-shared/fastapi-common-framework/-/commits/master)

## Version: 0.12.4

This is the common API framework used by the CSIRO geoanalytics software team. Not currently designed for use outside of the CSIRO geoanalytics team.

Code and concepts borrow heavily from [FastAPI Contrib](https://pypi.org/project/fastapi-contrib/) I suggest you check them out if you are looking for a user friendly open source FastAPI Utility framework.

## Testing

To run tests locally you will need to rename tests/.env.secret.template to tests/.env.secret and replace the blank values with your own. For CSIRO users, values can be found in the CI/CD Variables for the project.

Note: If you wish to change any of the .env values you can replace them in your own .env.secret file and they will take priority over the .env values without removing them.
lol-id-tools 1.7.1
An id tool for League of Legends with fuzzy string matching, nicknames, multiple locales, automatic updates, and translation.
License: MIT

![Python package](https://github.com/mrtolkien/lol_id_tools/workflows/Python%20package/badge.svg)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)



# lol_id_tools
An id tool for League of Legends with fuzzy string matching, nicknames, multiple locales, automatic updates, 
and translation.

The package relies on [rapidfuzz](https://github.com/rhasspy/rapidfuzz) for string matching.

This documentation pertains to version `1.0.0` and forward.

# Installation

Get lit with `pip install lol-id-tools`

# Demo
![Demo](demo.gif)

# Usage
## Import
```
import lol_id_tools as lit
```
## Get id from name
When the name is typed properly, matching takes 0.0004ms.
```
lit.get_id('Miss Fortune')
> 21
timeit('lit.get_id("miss fortune")', setup="import lol_id_tools as lit", number=1000)
> 0.0004502000000030648
```

Fuzzy string matching takes about 2ms.
```
lit.get_id('misfortune')
> 21
timeit('lit.get_id("misfortune")', setup="import lol_id_tools as lit", number=1000)
> 2.0069257
```

If the source locale for the name is not loaded, you can force load it with
```
lit.get_id('미스 포츈', locale='ko_KR')
> 21
```

The minimum_score parameter can be used to alter behaviour. 
```
lit.get_id('misfo')
lit.NoMatchingNameFound: No object name close enough to the input string found.

lit.get_id('misfo', minimum_score = 50)
> 21
```

All types of object can be matched by default.
```
lit.get_id('Maw of Malmortius')
> 3156
```

## Get name from ID
On patch 10.10 no champion, item, or rune shares an ID. If they do in the future, the package will need to be
updated accordingly.

```
lit.get_name(11)
> 'Master Yi'
```

If a locale needed for output is not loaded, it will automatically add it to the package.
```
lit.get_name(11, 'fr_FR')
> 'Maître Yi'
```

## Get translation
Default output is 'en_US'
```
lit.get_translation('미스 포츈')
> 'Miss Fortune'
```

If you haven’t loaded the input locale yet, you can supply it as a parameter
```
lit.get_translation('ミス・フォーチュン', 'zh_CN', input_locale='ja_JP')
> '赏金猎人'
```

If get_translation() is called on an existing locale, it returns the "clean" object name
```
lit.get_translation('Misfo', minimum_score = 50)
> 'Miss Fortune'
```

## Tests

You can take a look at the [tests suit](https://github.com/mrtolkien/lol_id_tools/tree/master/lol_id_tools/_tests) 
for more code examples.

## Notes

Data is saved in `~/.config/lol_id_tools` for offline usage and faster startup after first use.