semvec/pypi-packages huggingface dataset:
map-my-locations 0.1.0
CLI tool to plot location routes on a map
Requires Python: >=3.7

# Map-My-Locations

A lightweight, command-line tool and Python package for plotting GPS “stay” locations on an interactive map. Read your JSON file of location stays, extract coordinates from any nested path or key, draw numbered markers and straight-line routes, and save a self-contained HTML map you can view offline.

## Features

- No external API calls or plugins—100% powered by [Folium](https://github.com/python-visualization/folium)
- CLI entry point (`map-my-locations`) to run directly from the terminal
- Accepts any JSON structure:
  - Drill into nested arrays via `--array-path` (e.g. `route.stays`)
  - Custom latitude/longitude keys or indices via `--lat-key` / `--lng-key` (e.g. `location[0]`, `latitude`)
- Numbered, styled markers with rich popups showing metadata (start/end times, duration, data points, average speed, radius)
- Straight-line route segments with accurate Haversine distance calculations and on-map labels
- Popup summary of total route distance and stop count
- Automatic map centering and zoom based on coordinate spread
- Self-contained HTML output that works offline

## Installation

```
pip install map-my-locations
```

## Quickstart

```bash
map-my-locations path/to/stays.json
--array-path route.stays
--lat-key location
--lng-key location
--output stays_map.html
```

This command will:

1. Load `stays.json` and drill into `route.stays`  
2. Extract latitude and longitude using the specified keys  
3. Generate `stays_map.html` with numbered markers, route lines, and popups  
4. Automatically open `stays_map.html` in your default browser  

## CLI Usage

```
Usage: map-my-locations [OPTIONS] INPUT

Arguments:
INPUT Path to JSON file containing location data

Options:
-a, --array-path TEXT Dotted path to array of stay objects (default: "")
-x, --lat-key TEXT Key or path for latitude in each object (default: "location")
-y, --lng-key TEXT Key or path for longitude in each object (default: "location")
-o, --output TEXT Output HTML file name (default: "map.html")
-h, --help Show this message and exit.
```


## Example

Given `stays.json`:

```json
{
"route": {
"stays": [
{
"stayNumber": 1,
"location": [38.71303717, -90.26528184],
"start": "2025-08-28 14:11:58",
"end": "2025-08-28 14:16:32",
"duration": "0h 4m (4.57 minutes)",
"dataPoints": 27,
"averageSpeed": "1.69 units",
"searchRadius": "100 meters"
},
{
"stayNumber": 2,
"location": [38.71503717, -90.26728184],
"start": "2025-08-28 15:20:15",
"end": "2025-08-28 16:45:22",
"duration": "1h 25m (85.12 minutes)",
"dataPoints": 156,
"averageSpeed": "0.85 units",
"searchRadius": "100 meters"
}
]
}
}
```


Run:

```bash
map-my-locations path/to/stays.json
--array-path route.stays
--lat-key location
--lng-key location
--output stays_map.html
```

## License

MIT License
netbox-sitemaps 0.1.0
NetBox plugin to display sites on a map.
Requires Python: >=3.10.0

# NetBox Sitemaps Plugin

NetBox plugin to display sites on a map.


* Free software: MIT
* Documentation: https://Larster05.github.io/netbox-sitemaps/


## Features

The features the plugin provides should be listed here.

## Compatibility

| NetBox Version | Plugin Version |
|----------------|----------------|
|     4.0        |      0.1.0     |

## Installing

For adding to a NetBox Docker setup see
[the general instructions for using netbox-docker with plugins](https://github.com/netbox-community/netbox-docker/wiki/Using-Netbox-Plugins).

While this is still in development and not yet on pypi you can install with pip:

```bash
pip install git+https://github.com/Larster05/netbox-sitemaps
```

or by adding to your `local_requirements.txt` or `plugin_requirements.txt` (netbox-docker):

```bash
git+https://github.com/Larster05/netbox-sitemaps
```

Enable the plugin in `/opt/netbox/netbox/netbox/configuration.py`,
 or if you use netbox-docker, your `/configuration/plugins.py` file :

```python
PLUGINS = [
    'netbox-sitemaps'
]

PLUGINS_CONFIG = {
    "netbox-sitemaps": {},
}
```

## Credits

Based on the NetBox plugin tutorial:

- [demo repository](https://github.com/netbox-community/netbox-plugin-demo)
- [tutorial](https://github.com/netbox-community/netbox-plugin-tutorial)

This package was created with [Cookiecutter](https://github.com/audreyr/cookiecutter) and the [`netbox-community/cookiecutter-netbox-plugin`](https://github.com/netbox-community/cookiecutter-netbox-plugin) project template.
multiprog 1.0.0
Simple to use progress bar with subprocesses and threads.
Requires Python: >=3.10

# MultiProgress: the enriched progress bar

A simple to use `progress_bar` in sub-processes or threads using [rich](https://github.com/Textualize/rich).
See the [examples](./src/multiprogress/examples) folder for more examples.

```python
import time
import random
from concurrent.futures import ProcessPoolExecutor
from enriched_progress import MultiProgress, progress_bar


def do_work(n: int) -> int:
    sleep_for = random.randint(0, 2)
    for _ in progress_bar(
        range(1, n + 2), desc=f"Sleeping for {sleep_for} secs for each {n} iterations."
    ):
        time.sleep(sleep_for)
    return sleep_for


def demo():
    with ProcessPoolExecutor() as p, MultiProgress():
        print(list(p.map(do_work, range(10))))
```

## Install

```
pip install multiprog
```

### Using Other Rich Features

> [!Note]
> The `progress_bar` function doesn't need to know about the `MultiProgress` instance.
> The only time the two components will need to share state is the case
> where multiple instances of `MultiProgress` are being used in the main process. In such cases
> you will use a `key` to send progress updates to the correct instance.

```python
import time
from rich.console import Console, Group
from rich.live import Live
from rich.panel import Panel
from concurrent.futures import ProcessPoolExecutor, as_completed
from enriched_progress import MultiProgress, progress_bar
import random
import os


def work(status_name: str) -> str:
    for _ in progress_bar(
        range(random.randint(2, 40)),
        desc=f"Working on task for {status_name}",
        metrics_func=lambda: dict(pid=os.getpid()),
    ):
        time.sleep(random.random() * 2)
    return status_name


def demo():
    console = Console()
    status = console.status("Working on tasks...")
    with (
        ProcessPoolExecutor() as p,
        MultiProgress(transient=True)(live_mode=False) as mp,
        Live(Panel(Group(status, mp))),
    ):
        futures = [
            p.submit(work, status_name)
            for status_name in ("status1", "status2", "status3")
        ]
        done = []
        for f in as_completed(futures):
            done.append(f.result())
            status.update(f"[bold green]Done tasks: {','.join(done)}")
        status.update("[bold green]All are done!!!")


if __name__ == "__main__":
    demo()
```

[![asciicast](https://asciinema.org/a/655OZvrGusWRldzpHGjhOjhOD.svg)](https://asciinema.org/a/655OZvrGusWRldzpHGjhOjhOD)