semvec/pypi-packages huggingface dataset:
cargo-workspace 1.2.8
Parse a cargo workspace and analyze its packages
Requires Python: >=3.6
Keywords: cargo, rust

# Cargo Workspace

Parse Rust Workspace files from a `Cargo.toml` file.

## Example

```python
from cargo_workspace import Workspace

# Path can be a file or directory:
workspace = Workspace.from_path('Cargo.toml')

for crate in workspace.crates:
	print(f'Dependencies of {crate.name}:')
	for dep in crate.dependencies:
		print(f' - {dep.name}')
```

### Metadata

The metadata of each crate is accessible as well:

```python
meta = crate.workspace.get('some.custom.key')

if meta not None:
	print(f'custom metadata found: {meta}')
```
grantt 0.2.0
Making Gantt charts in matplotlib
Requires Python: >=3.11

# Granttpy

## When you want to make a Gantt chart look nice for a grant or whatever

![Example Gantt chart](https://raw.githubusercontent.com/dannys4/granttpy/main/examples/example.png)

## Installation

You can install directly from this repository via

```bash
pip install grantt
```

As a side-note, we recommend installing with [`uv`](https://docs.astral.sh/uv/) using

```bash
uv pip install grantt
```

## Example

After `grantt` is installed, copy the script from [here](https://github.com/dannys4/granttpy/blob/main/examples/ex.py) into `ex.py` and run `python ex.py` (or `python3` depending on your installation).

## Basic instructions

Making a Gantt chart is as easy as making different `grantt.Element`s, the parent class for all the different things on the chart. Type `help(grantt.Element)` to see the fields for the constructor: most of them should be self-explanatory, but here are a few notes on the more cryptic fields.

- `zorder_delta`: how much precedent the element should have when displaying on top of (or behind) other objects
- `level_increment`: The chart is generated by starting from the top and moving down. Every time that an element with a nonzero increment is added, the following elements are below it vertically. If you have two elements overlapping vertically, try increasing the `level_increment` of one.
- `textalignment`: takes `left`, `right`, or `center`.
- Any `color`s (i.e., `color` or `textcolor`) take in any argument that MPL would (e.g., `k` for black or `#FF0000` for red, etc).

### `grantt.Span`

A `grantt.Span` just spans an amount of time, generally acting as a divider between two vertically adjacent sections. It has a start and end date as well as an adjustable edge height for the prongs on the sides.

### `grantt.Period`

A `grantt.Period` also spans an amount of time, but acts more as a time period that one might work on a task. These are represented by thicker lines; therefore, you may be interested in changing `lw`, the linewidth of the element.

### `grantt.Event`

A `grantt.Event` is a point in time that something happens with no duration---think milestone or deadline. Along with choosing the `date` of the deadline, you can customize the `marker` and its `markersize` (which will need to be done based on the aspect ratio and scaling of the figure).

## Defaults

There are several defaults that you can customize using `Gantt.set_X`, where `X` is the option.

- `marker`: default marker for `grantt.Event` elements
- `markersize`: default markersize for `grantt.Event` elements
- `linewidth`: default linewidth for `grantt.Period` elements
- `textcolor`: default textcolor for all elements
- `span_edge_height`: default height of the edge brackets for `grantt.Span` elements
- `luminance_threshold`: the threshold for automatically switching between white and black text in `grantt.Period` elements based on their color.
freshspark 0.1.0
Create truly fresh local Spark sessions with isolated temp dirs and reliable teardown.
Requires Python: >=3.8
Keywords: pyspark, spark, spark-session, spark local, spark cleanup

# freshspark

Create **truly fresh** local Spark sessions with isolated temp dirs and reliable teardown.

- Isolates `spark.sql.warehouse.dir` and (optionally) embedded Derby **metastore** in unique temp dirs
- Defaults to **in-memory catalog** (no Derby) to avoid classic local locks
- Randomizes Spark UI port to avoid collisions and prints the UI URL
- Aggressively shuts down Py4J so the JVM actually exits
- Simple API: context manager, `(spark, cleanup)` pair, decorator, and a tiny CLI

## Install
```bash
pip install freshspark
```

## Quick start
```python
from freshspark import fresh_local_spark, get_fresh_local_spark

# Context manager (fresh per `with`)
with fresh_local_spark(app_name="etl", preset="dev") as spark:
    spark.range(10).show()

# Manual lifecycle
spark, cleanup = get_fresh_local_spark(app_name="demo", preset="fat")
try:
    spark.range(1000).summary().show()
finally:
    cleanup()
```

## Friendly features

- **Presets**: `preset="tiny" | "dev" | "fat"` set sane memory defaults.
- **No Hive by default**: in-memory catalog avoids Derby locks. Enable with `hive_metastore=True` if you need it.
- **Clean UI**: UI port auto-randomized; prints the URL once up.
- **Optional reuse (same process)**: `reuse_within_process=True` to keep one isolated session for repeated calls.
- **Decorator**: run any function inside a fresh session:

```python
from freshspark import ensure_fresh

@ensure_fresh(preset="dev")
def job(input_path: str, *, spark):
    return spark.read.csv(input_path, header=True).count()

print(job("data.csv"))
```

## CLI

```bash
# Open a REPL with `spark` ready:
freshspark repl --preset fat

# Stop any sticky active session in this process:
freshspark reset
```

## Jupyter tip

To be extra safe in notebooks:

```python
from freshspark import get_fresh_local_spark

spark, cleanup = get_fresh_local_spark(app_name="nb", preset="dev")
# ... work ...
# On finish (or in a finally cell):
cleanup()
```

## Why?
Local PySpark sessions can "stick"—leaving JVMs, metastore locks, or port clashes behind.
**freshspark** guarantees a clean slate every run.

## License
Apache 2.0