semvec/pypi-packages huggingface dataset:
blocket-cli 0.2.0
Fast CLI for searching Blocket.se — optimized for agents and scripting
Requires Python: >=3.10
Keywords: blocket, cli, marketplace, search, sweden

# blocket-cli

[![CI](https://github.com/lennart-johansson/blocket-cli/actions/workflows/ci.yml/badge.svg)](https://github.com/lennart-johansson/blocket-cli/actions/workflows/ci.yml)
[![Python 3.10+](https://img.shields.io/badge/python-3.10+-blue.svg)](https://python.org)
[![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](LICENSE)

Fast CLI for searching [Blocket.se](https://www.blocket.se) — Sweden's largest marketplace.

Designed for agents, scripts, and quick terminal lookups. Minimal dependencies, structured output.

## Install

```bash
pip install blocket-cli
```

Or with [uv](https://docs.astral.sh/uv/):

```bash
uv tool install blocket-cli
```

## Usage

### Search listings

```bash
blocket search "soffa"
blocket search "iphone 15" -l stockholm --price-max 8000
blocket search "mountainbike" -c sports --sort price-asc -n 10
blocket search "ps5" -c electronics -o json | jq '.results[:3]'
```

### Get ad details

```bash
blocket ad 20851738
blocket ad 20851738 -o json
```

### Browse filters

```bash
blocket categories
blocket locations
```

## Output formats

| Flag | Format | Use case |
|------|--------|----------|
| (default) | Human-readable table | Terminal browsing |
| `-o json` | Compact JSON | Piping to `jq`, API consumption |
| `-o jsonl` | One JSON object per line | Streaming, log processing |

## Search options

| Option | Description |
|--------|-------------|
| `-l`, `--location` | Filter by Swedish county (e.g. `stockholm`, `skane`) |
| `-c`, `--category` | Filter by category (e.g. `electronics`, `furniture`) |
| `--price-min` | Minimum price in SEK |
| `--price-max` | Maximum price in SEK |
| `--sort` | Sort order (`relevance`, `price-asc`, `price-desc`, `date`) |
| `-n`, `--limit` | Max results to display |
| `-p`, `--page` | Page number |
| `-o`, `--output` | Output format (`table`, `json`, `jsonl`) |

## Agent integration

The JSON output is designed for LLM agents and automation:

```bash
# Structured search results
blocket search "cykel" -l stockholm --price-max 5000 -o json

# Stream results line by line
blocket search "soffa" -o jsonl

# Filter by category
blocket search "lampa" -c furniture -o json | jq '[.results[] | {title: .heading, price: .price.amount, location}]'
```

## License

MIT
Topsis-Sparsh-Gupta-102317228 1.0.0
A Python implementation of the TOPSIS (Technique for Order Preference by Similarity to Ideal Solution) method.
Requires Python: >=3.7

# Topsis-Sparsh_Gupta-102317228

A Python implementation of the **TOPSIS (Technique for Order Preference by Similarity to Ideal Solution)** method for multi-criteria decision making.

---

# 📌 What is TOPSIS?

TOPSIS is a Multi-Criteria Decision Making (MCDM) technique used to rank alternatives based on:

- Distance from the Ideal Best solution
- Distance from the Ideal Worst solution

The best alternative is:
- Closest to the Ideal Best
- Farthest from the Ideal Worst

---

# ⚙️ Mathematical Steps

1. Normalize the decision matrix
2. Multiply by weights
3. Determine Ideal Best and Ideal Worst
4. Compute Euclidean distances
5. Calculate relative closeness score
6. Rank alternatives

---

# 📊 Algorithm Flow (Mermaid Diagram)

```mermaid
flowchart TD
    A[Start] --> B[Read Input File]
    B --> C[Validate Data]
    C --> D[Normalize Matrix]
    D --> E[Apply Weights]
    E --> F[Find Ideal Best & Worst]
    F --> G[Compute Distances]
    G --> H[Calculate TOPSIS Score]
    H --> I[Rank Alternatives]
    I --> J[Save Output File]
    J --> K[End]
```



# 📥 Installation

Install from PyPI:

```bash
pip install Topsis-Sparsh Gupta-102317228
```

Or install locally:

```bash
pip install .
```

---

# 🚀 Usage (Command Line)

```bash
topsis <InputFile> <Weights> <Impacts> <OutputFile>
```

### Example

```bash
topsis data.xlsx "1,1,1,2" "+,+,-,+" result.csv
```

---

# 📄 Input Format

The input file must:

- Contain at least 3 columns
- First column: Identifier (Name/ID)
- Remaining columns: Numeric values only
- Weights must be comma-separated
- Impacts must be '+' or '-'

### Example Input

| Fund | P1 | P2 | P3 | P4 |
|------|----|----|----|----|
| M1 | 0.67 | 0.45 | 5.6 | 12.56 |
| M2 | 0.6 | 0.36 | 3.5 | 14.47 |

---

# 📤 Output Format

The output file contains:

- Original data
- Topsis Score column
- Rank column

Higher score = Better rank

---

# 🧮 Mathematical Formula

### Normalization

\[
R_{ij} = \frac{x_{ij}}{\sqrt{\sum x_{ij}^2}}
\]

### Weighted Matrix

\[
V_{ij} = w_j \cdot R_{ij}
\]

### Distance Measures

\[
S_i^+ = \sqrt{\sum (V_{ij} - A_j^+)^2}
\]

\[
S_i^- = \sqrt{\sum (V_{ij} - A_j^-)^2}
\]

### Topsis Score

\[
C_i = \frac{S_i^-}{S_i^+ + S_i^-}
\]

---

# 🛑 Error Handling

The program checks for:

- File not found
- Incorrect number of parameters
- Less than 3 columns
- Non-numeric values
- Mismatch in weights and impacts
- Invalid impacts

---

# 🧠 Requirements

- Python 3.7+
- numpy
- pandas
- openpyxl

---

# 👤 Author

Sparsh Gupta  
102317228 

---

# 📜 License

MIT License
pycep-parser 0.7.1.dev4
A Python based Bicep parser
Requires Python: >=3.10
Keywords: bicep, parser, lark

# pycep

[![Build Status](https://github.com/gruebel/pycep/workflows/CI/badge.svg)](https://github.com/gruebel/pycep/actions)
[![codecov](https://codecov.io/gh/gruebel/pycep/branch/master/graph/badge.svg?token=49WHVYGE1D)](https://codecov.io/gh/gruebel/pycep)
[![PyPI](https://img.shields.io/pypi/v/pycep-parser)](https://pypi.org/project/pycep-parser/)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/pycep-parser)](https://github.com/gruebel/pycep)
![CodeQL](https://github.com/gruebel/pycep/workflows/CodeQL/badge.svg)
[![OpenSSF Scorecard](https://api.securityscorecards.dev/projects/github.com/gruebel/pycep/badge)](https://api.securityscorecards.dev/projects/github.com/gruebel/pycep)

A parser for [Azure Bicep](https://github.com/Azure/bicep) files leveraging [Lark](https://github.com/lark-parser/lark).

## Getting Started

### Requirements

- Python 3.9+
- Lark 1.1.2+

### Install

```shell
pip install --upgrade pycep-parser
```

## Current capabilities

[Supported capabilities](docs/capabilities.md)

## Next milestones

### Custom data types
Initial support was added with following parts still missing
- Array type
- Decorators in object type
- Union type in object type

### Functions
- [ ] Array (in progress)
- [ ] CIDR (in progress)
- [ ] Lambda (in progress)

### Operators
- [ ] Safe-dereference

### Considering
- 1st class support of interpolated strings

### Out-of-scope
- Bicep to ARM converter and vice versa

## Contributing

Further details can be found in the [contribution guidelines](CONTRIBUTING.md).
pydesignflow 0.5.1
Micro-Framework for FPGA / VLSI Design Flow in Python
Requires Python: >=3.8

# PyDesignFlow

A **technology- and tool-agnostic micro-framework** for building **FPGA / VLSI design flows** in Python.

[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![ORDeC on PyPI](https://img.shields.io/pypi/v/pydesignflow.svg)](https://pypi.python.org/pypi/pydesignflow)
[![Read the Docs](https://img.shields.io/readthedocs/pydesignflow)](https://pydesignflow.readthedocs.io)

## Quick Example

```python
from pydesignflow import Block, Flow, task, Result

class SynthesisBlock(Block):
    @task()
    def synthesize(self, cwd):
        # [Call synthesis tool here]
        result = Result()
        result.timing_met = True
        result.netlist = cwd / "netlist.v"
        return result

    @task(requires={'syn': '.synthesize'})
    def place_and_route(self, cwd, syn):
        if not syn.timing_met:
            raise RuntimeError("Synthesis timing not met, cannot proceed with P&R")
        print(f"Using netlist: {syn.netlist}")
        # [Call place & route tool here]
        result = Result()
        result.bitstream = cwd / "design.bit"
        result.utilization = 0.75
        return result

flow = Flow()
flow['fpga'] = SynthesisBlock()

if __name__ == '__main__':
    flow.cli_main()
```

Save this as `flow.py` (or `flow/__init__.py` as basis for a multi-file design flow), then run targets from the command line:

```bash
flow fpga.place_and_route
```

## Key Concepts

- **Flow**: Central object managing all design blocks, accessible via command line
- **Block**: Encapsulates a design component (hardware block, testbench, etc.). Define by subclassing `Block`.
- **Task**: Methods decorated with `@task()` that perform design steps. A task of a specific block instance is called a **Target**.
- **Result**: Data returned by tasks, serialized to JSON. At most one result per target.
- **Dependencies**: Tasks can depend on results from other tasks. Missing dependencies are built automatically.

## Design Principles

- **No source file tracking**: Unlike Make, PyDesignFlow doesn't track source changes. The designer decides when to rebuild, avoiding unnecessary long tool runtimes while maintaining simplicity.
- **Encapsulation**: Each task gets its own output directory and should only write there.
- **Flexibility**: Blocks support parameters through instantiation. Single or multi-block hierarchical designs are supported.

## Example Projects

- **[RISC-V Lab](https://github.com/tub-msc/rvlab)**: An FPGA-based RISC-V design platform and flow for teaching SoC development, using PyDesignFlow to manage hardware synthesis, simulation, and software builds.

## Related Tools

- **[NoTcl](https://github.com/TobiasKaiser/notcl)**: Python library for automating Tcl-based FPGA/VLSI tools without Tcl scripting, complementing PyDesignFlow by providing Python interfaces to design tools.

## Documentation

Full documentation: https://pydesignflow.readthedocs.io

## License

Copyright 2022 - 2026 Tobias Kaiser

SPDX-License-Identifier: Apache-2.0
notifykit 0.3.0
A modern efficient Python toolkit for building applications that need to watch filesystem changes
Requires Python: >=3.10

<p align="center">
  <img loading="lazy" src="https://raw.githubusercontent.com/roma-glushko/notifykit/main/imgs/logo.png" width="400px" alt="notifykit">
</p>
<p align="center">
    <em>👀 A cross-platform filesystem watcher toolkit for Python</em>
</p>

<a href="https://pypi.org/project/notifykit/"><img src="https://img.shields.io/pypi/v/notifykit" alt="PyPI - Version"></a>
<a href="https://pypi.org/project/notifykit/"><img src="https://img.shields.io/pypi/dm/notifykit" alt="PyPI - Downloads"></a>
![GitHub License](https://img.shields.io/github/license/roma-glushko/notifykit)

**notifykit** is a set of components for building modern Python applications with a need for watching filesystem events efficiently.

> [!Note]
> `notifykit` has been running successfully in production for 2+ years.

## Installation

```bash
pip install notifykit
# or
uv add notifykit
```

notifykit is available for:

CPython 3.10+ on the following platforms:

- **Linux**: x86_64, aarch64, x86, armv7, s390x, ppc64le, musl-x86_64, musl-aarch64
- **MacOS**: x86_64 & arm64
- **Windows**: x64 & x86

PyPy 3.11+ on the following platforms:

- **Linux**: x86_64 & aarch64
- **MacOS**: x86_64

## Usage

```python
import asyncio
from pathlib import Path

from notifykit import Notifier, CommonFilter


async def watch(watched_dir: Path) -> None:
    notifier = Notifier(
        debounce_ms=200,
        filter=CommonFilter(),
    )
    await notifier.watch([watched_dir])

    async for events in notifier:
        # process your events
        print(events)


if __name__ == "__main__":
    watched_dir = Path("./watched_dir")
    watched_dir.mkdir(exist_ok=True)

    asyncio.run(watch(watched_dir))
```

## Features

- Simple Modern Pythonic API (async)
- High Performance
- Cross-platform (Linux, MacOS, Windows)
- Built-in event filtering (`CommonFilter`, custom `EventFilter` subclasses)
- Easy to mock in tests
- Makes common cases easy and advanced cases possible

## Sources of Inspiration

- https://github.com/seb-m/pyinotify/issues
- https://github.com/absperf/asyncinotify/
- https://docs.rs/notify/latest/notify/
- https://github.com/samuelcolvin/watchfiles
- https://github.com/pantsbuild/pants/tree/612e891e90432e994327b6ddaf57502366a714c0/src/rust/engine
- https://github.com/pola-rs/polars/blob/d0c8de592b71d4b934b1598926536f03e10007bd/py-polars/src/file.rs#L206
- https://github.com/TheoBabilon/async-tail/
terrex 1.0.0
Programmable automation client for Terraria servers
Requires Python: >=3.10
Keywords: terraria, automation, bots, agents, protocol, api

# Terrex

Programmable automation client for Terraria worlds.

[![PyPI version](https://badge.fury.io/py/terrex.svg)](https://badge.fury.io/py/terrex)

![Terrex logo](https://raw.githubusercontent.com/makstashkevich/terrex/master/assets/logo.jpg)

---

## What is Terrex?

Terrex is a Python framework for building programmable Terraria agents (bots).

It provides a clean event-driven API for connecting to servers, reacting to world state,
parsing packets and executing scripted behaviors.

Originally inspired by an archived [TerraBot](https://github.com/flammified/terrabot) project by Alexander Freeman (MIT licensed) (inactive for ~10 years),  
Terrex is a modernized, extended and actively developed fork focused on:

* automation
* simulation
* protocol control
* scalable multi-agent systems

Think of it as a runtime for Terraria agents — not just a bot.

---

## Installation

```bash
pip3 install terrex
````

---

## Core Features

* Connect to Terraria servers as a client
* Full chat interaction
* Event-driven packet handling
* Live world & player state parsing
* Item & tile updates tracking
* Programmatic movement (teleport + control layer)
* Extensible event system for custom logic

---

## Minimal Example

A basic bot that connects to a server and reacts to chat messages:

```python
from terrex import Terrex
from terrex.events import Events

bot = Terrex("127.0.0.1")
events = bot.get_event_manager()

@events.on_event(Events.Chat)
def on_chat(event_id, message):
    print(message)

    if "stop" in message.lower():
        bot.stop()

bot.start()

while bot.client.running:
    pass
```

More examples are available in the `examples/` directory.

---

## Project Philosophy

Terrex is built as an automation engine — not a cheat client.

Primary use cases include:

* programmable agents
* server testing & simulation
* AI experiments
* scripted behaviors
* world interaction automation

Anything else is simply an emergent property.

---

## Contributing

Terrex is under active development and contributions are welcome.

Current high-priority areas:

* NPC packet parsing
* Item interactions & drops
* Player synchronization packets
* Tile placement & world modification
* Movement & physics layer

Packet documentation reference:
[https://github.com/MakStashkevich/terrex/blob/master/docs/packets.md](https://github.com/MakStashkevich/terrex/blob/master/docs/packets.md)

---

## Origins

Terrex is based on a fork of the original [TerraBot](https://github.com/flammified/terrabot) project by Alexander Freeman (MIT licensed) (now archived and unmaintained).
The codebase has been refactored, extended and re-architected for modern Python workflows.

---

## Roadmap (high level)

* stable protocol layer
* multi-agent orchestration
* scripting behaviors (FSM / behavior trees)
* performance scaling
* cleaner API surface