semvec/pypi-packages huggingface dataset:
metatreedb 0.2.3
Metatree is a DBMS that uses the filesystem itself as a tree-structured database.
Requires Python: >=3.7

# metatreedb

__Metatree__ is a DBMS that uses the filesystem itself to organize and manage data in a tree-structured format.

In `metadata.json` in each tree node, you can manage information about child nodes, which can also be used for searching.

## Features

* metadata-based index
* db-level concurrency control
* abstract filesystem support (fsspec)
  * local
  * HDFS
  * S3

## Installation

```bash
pip install metatreedb
```

## Quick Start

Here's an example of using Metatree as a model repository by setting up a database with `(model_name, version,)` as identifiers:

```bash
from metatree import Metatree

metatree = Metatree(
    "/tmp/my-model-repository",
    (
        "model",
        "version",
    ),
)

import uuid
import pickle

from pathlib import Path

for i in range(1, 4):
    awful_uuid = uuid.uuid4()
    trained = Path("/tmp/my-model-repository/trained.pkl")
    with open(trained, "wb") as f:
        pickle.dump(awful_uuid, f)
    metatree.put(f"my-awful-model/v{i}", trained)
```

This will create files and directories in your filesystem as shown:

```bash
❯ tree /tmp/my-model-repository
/tmp/my-model-repository
├── metadata.json
└── my-awful-model
    ├── metadata.json
    ├── v1
    │   ├── metadata.json
    │   └── trained.pkl
    ├── v2
    │   ├── metadata.json
    │   └── trained.pkl
    └── v3
        ├── metadata.json
        └── trained.pkl
```


To add metadata information, use `find` and `update`:

```python
metatree.find("my-awful-model")
metatree.update(active="v2")
for i in range(1, 4):
    metatree.find(f"my-awful-model/v{i}").update(model_file="trained.pkl")
```

This will update the `metadata.json` files as follows:

```bash
❯ cat /tmp/my-model-repository/my-awful-model/metadata.json
{"children": ["v1", "v2", "v3"], "active": "v2"}

❯ cat /tmp/my-model-repository/my-awful-model/v*/metadata.json
{"model_file": "trained.pkl"}
{"model_file": "trained.pkl"}
{"model_file": "trained.pkl"}
```

You can use this search index to find files. By enclosing the keys from `metadata.json` within angle brackets `<>` and substituting them in location, you can perform searches as follows:

```python
metatree.find("my-awful-model/<active>")
print(metatree.location)
# This returns `/tmp/my-model-repository/my-awful-model/v2

file = metatree.get("my-awful-model/<active>/<model_file>")
print(file)
# The given path translates to `my-awful-model/v2/trained.pkl`,
# and it returns generator object
```

### with WebHDFS

To use WebHDFS, set the root path to the WebHDFS URL and provide hdfs args:

```python
from metatreedb import Metatree

metatree = Metatree(
    "webhdfs:///tmp/my-model-repository",
    ("model", "version"),
    host="localhost",
    port=9870,
    user="hadoop",
)
```

### with S3

To use S3, set the root path to the S3 bucket URL and provide s3fs args:

```python
from metatreedb import Metatree

metatree = Metatree(
    "s3://your-awesome-bucket/tmp/my-model-repository",
    ("model", "version"),
    endpoint_url="http://localhost:5000",
    key="testing",
    secret="testing",
)
```
heroku-audit 0.0.3
Command-line tool for reporting on specific attributes of a Heroku environment.
Requires Python: >=3.9

# Heroku-audit

[![CI](https://github.com/torchbox/heroku-audit/actions/workflows/ci.yml/badge.svg)](https://github.com/torchbox/heroku-audit/actions/workflows/ci.yml)![PyPI](https://img.shields.io/pypi/v/heroku-audit.svg)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/heroku-audit.svg)
![PyPI - Wheel](https://img.shields.io/pypi/wheel/heroku-audit.svg)
![PyPI - Status](https://img.shields.io/pypi/status/heroku-audit.svg)
![PyPI - License](https://img.shields.io/pypi/l/heroku-audit.svg)

Command-line tool for reporting on specific attributes of a Heroku environment.

## Components

- Apps
- Users
- Environment Variables
- Heroku Postgres
- Heroku Data for Redis

## Installation

### PyPI

```
pip install heroku-audit
```

### Homebrew

Heroku Audit can be installed from Torchbox's [Homebrew tap](https://github.com/torchbox/homebrew-tap).

```
brew tap torchbox/tap
brew install heroku-audit
```

### Arch Linux

Arch users can install [`heroku-audit`](https://aur.archlinux.org/packages/heroku-audit) from the AUR.

```
paru -S heroku-audit
```

### Pre-compiled binaries

You can download the pre-compiled binary from the releases, built with [`pyinstaller`](https://pyinstaller.org/en/stable/).

## Usage

Note: See `heroku-audit --help` for further details.

Authentication is handled through the `$HEROKU_API_KEY` environment variable, which must be set to a valid Heroku API key. Alternatively, you can create a `config.env` file in the config directory (`heroku-audit --show-config-dir`).

Each components is its own sub-command, containing a number of pre-made reports. `heroku-audit --list` will list all available commands.

To audit for a single team, add `--team=<team>`.

### Output Format

By default, a pretty table is output, for easy consumption by humans. `--format` can be specified to all commands to change the format:

- `table` (Default)
- `csv`
- `json`
- `count`

Progress output is automatically removed when running non-interactively.
burane-weather-app-20-11-2024 0.4.0
application météo
Requires Python: >=3.6

# WeatherApp

## Example usage


```python
caen = (49.183, -0.38)
w = Weather()
w.display_currrent_weather(caen[0], caen[1], 1)
today = date.today() - timedelta(weeks=1)
yesterday = today - timedelta(days=1, weeks=1)
w.display_past_weather(caen[0], caen[1], yesterday, yesterday)
```