semvec/pypi-packages huggingface dataset:
uml_django 1.0.4
A UML Generator for Django and Django Rest Framework projects
Requires Python: >=3.8,<4.0

# Django UML Generator

Uml-Django is a library that aims to convert project models into a UML diagram, indicating their attributes, methods and the relationships of all entities.

## How it Works

From a file created at the root of the project (this is an important step that will be demonstrated below), it will be necessary to create an instance of the Library Class, passing the path to the project's "settings.py" file as a parameter.

With this configuration duly performed and executing the created file, an inspection will be carried out throughout the project in search of all the models of the apps present. Once identified, their attributes, methods, and their relationships with other models, if any, will be saved.

After that, a png file named "class diagram.png" will be created (also in the project root) with a simple class diagram of all classes of the identified models.

## Installation and Usage

Before starting the installation, below are important guidelines to ensure the proper functioning of the application.

- Make sure that python and pip are properly updated, in the current release the library was created with python Python 3.9.6 and Pip 21.2.4. Be with equal or higher versions.

- Install in the same environment as the project's dependencies, for example with the python virtual environment activated (venv), so that the inspection is effective.


1.  Start by downloading the "django_uml" dependency via pip

```
pip3 install uml-django
```

2. Create a .py file at the root of the project (this step is important), below is an example of a simple project and the extension file called "inspect_class.py"

```
.
├── db.sqlite3
├── django_project
│   ├── __init__.py
│   ├── asgi.py
│   ├── settings.py
│   ├── urls.py
│   └── wsgi.py
├── manage.py
├── app_01
├── app_02
└── app_03
├── requirements.txt
├── inspect_class.py
├── venv

```
- The project has 3 apps and the "django_project" directory where the configuration file "settings.py" is located. In addition, the file "inspect_class.py" was added to the root of the project

3. With the file created, just follow the code below, which consists of instantiating an object and parameterizing the path to the project's "settings.py" file, then just call two functions as shown below.

```
from uml_django.inspect import Inspect

inspect_obj = Inspect('django_project.settings')

inspect_obj.inspect()
inspect_obj.create_UML()
```

4. Run the file "inspect_class.py"

```
python3 inspect_class.py
```

After the guidelines, the png file with the diagram will appear in the root of the project with the name "class_diagram.png", containing all the project models synthesized in a class diagram

## Final Considerations
This is an Open-Source project, so you are free to receive suggestions for improvements and enhancements to ensure the quality and viability of the code.
This communication will be very effective if applied in Issues and PR's openings so that the maintainers can discuss and implement new ideas and bug fixes.
json-rm 0.0.2
Parse JSON Schemas into relational model and transpile into other textual representations.
Requires Python: >=3.9

json-rm
=======

This tool parses a JSON Schema into "Entities" and "Attributes", which correspond to tables and columns in a relational database. It can be used to output different representations of the data model described by the input schema.

## Installation

```
pip install json-rm
```

## Command line usage

```
jst <command> <schema_path>
```

### Examples

Use the 'simple' formatter on a schema:

```
$ jst simple resources/schemas/1.2.246.537.6.1506.7000.2022.1.10.json
```

Use the 'postgres' formatter on a schema:

```
$ jst postgres resources/schemas/1.2.246.537.6.1506.7000.2022.1.10.json
```

Use the 'spark' formatter on a schema:

```
$ jst spark resources/schemas/1.2.246.537.6.1506.7000.2022.1.10.json
```

## Using from your Python code

```
import json_rm
from json_rm.formatters import SimpleFormatter

schema = json_rm.JSONSchema.from_file("schema.json")
formatter = SimpleFormatter()

print(schema.render(formatter))
```

## Parsing options

### normalization

- Denormalized (default) mode results in a flat structure with less tables.
- Normalized mode results in a deep structure with more tables.

When `normalization` is set to `False` (default), the parser operates in "denormalized" mode, creating a new `Entity` only for the root object and repeating (`array`) objects. In the "normalized mode, a separate `Entity` is created for each nested structure (JSON objects and arrays).
fastapi-easy-cache 1.0.1
A simple tool for caching fastapi response
Requires Python: >=3.8,<4.0

# Fastapi easy cache

<hr>
An easy to use tool for caching fastapi returnings using sqlite as backend

### When should I use fastapi-easy-cache?
1. Returning json serializable data
2. Using GET method
3. Returning dynamic but repeated data (like data refresh everyday)
4. Don't have complicated requirements and too lazy to build a tool yourself

### When should I NOT use fastapi-easy-cache?
1. Returning not json serializable data (bytes, datetime, etc)
2. Using POST method
3. Returning frequently changing data (like data refresh every second)
4. Need advanced features (recommend: [fastapi-cache](https://github.com/long2ice/fastapi-cache))

<hr>

## Installation
We recommend you have fastapi installed
```shell
pip install fastapi-easy-cache
```

## Usage

### Initializing

The following code will
1. create a sqlite database in **dbPath**
2. sotore cache in filesystem
```python
import fastapi_easy_cache

fastapi_easy_cache.apiCache(db_path='./temp/cache', in_memory=False)
```
#### args
db_path: path to sqlite database
in_memory: set up cache in memory, db_path will be database name when set to True


### Using
You just need to add `@cache(expire=20)` under fastapi route decorator, add flil in expire time and it's all done.

`expire` is counted in second

```python
from fastapi_easy_cache import cache

@app.get('/testCache/{path}')
@cache(expire=20)
def test(path):
    data = path
    return data
```

With GET route with arguments, you must add request: Request to your function
```python
from starlette.requests import Request
from fastapi_easy_cache import cache

@app.get('/testCacheWithArg/{path}')
@cache(expire=20)
def testArg(path, arg1, arg2, request: Request):
    data = {'path': path,
         'arg1': arg1,
         'arg2': arg2}
    return data
```
showmethetypes 0.1
A one-function package designed to do one thing.. show you the types!
Requires Python: >=3.8

# Show Me The Types (SMTT)
This is a package designed to provide a single utility:
**showing you the types!**

If you frequently end up handling lists of tuples of tensors, lists of tensors, nested lists and tuples, or other similarly convoluted structures, SMTT might be able to make your life just a bit easier. Instead of thinking about needing `len`, `.shape`, `.size()`, or printing out the structure and parsing the brackets and parens, you can just do `tt(data)`, and get an instant overview of the structure.  

```python
from showmethetypes import SMTT
import torch

tt = SMTT()
structure = [(torch.randn(2,3), torch.randn(500, 5, 128)) for _ in range(5)]

tt(structure)
```
```
list (5)
    |__tuple
        |__Tensor (dtype: torch.float32)
        |   |  (device: cpu)
        |   |__dim_0 (2)
        |   |__dim_1 (3)
        |__Tensor (dtype: torch.float32)
            |  (device: cpu)
            |__dim_0 (500)
            |__dim_1 (5)
            |__dim_2 (128)
```
## Installation
The package isn't yet available on pip, so a local install is the way.
```sh
git clone https://github.com/InfiniteSwerve/ShowMeTheTypes.git
cd ShowMeTheTypes
pip install -e .
```

## Behavior 
SMTT will by default display the type for whatever you pass it, and traverse all nested types if the passed object has a `__getitem__` method.

The default behavior is to iterate across *all* subtypes, which means it will print out everything the object contains. Some types, like lists, are usually monomorphic, so SMTT will assume monomorphism and only print out the nested structure in the first item of the list. 

SMTT will also infer your current imports and use the specific handlers available for any libraries in your `locals()`.
## Coverage
SMTT is quite fresh, and so the current coverage only includes objects that I've needed to work with directly. 
If you feel sad about any missing types, **feel free to raise an issue requesting it, or even make a PR!** Creating new handlers for types is quite straightforward. 
## Testing
You can run the tests with `pytest --nbval`.
Since the core functionality doesn't change, the testing focus is on regression tests. For this we use pytest and nbval, using the cell outputs of jupyter notebooks to make sure the untouched cell outputs haven't changed.



The libraries with any coverage are listed here, and you can find detailed coverage information in [handlers.py](https://github.com/InfiniteSwerve/ShowMeTheTypes/blob/main/showmethetypes/handlers.py). 
| Library | Total Coverage |
|---------|----------------|
| stdlib  | No             |
| Pytorch | No             |
| Numpy   | No             |