semvec/pypi-packages huggingface dataset:
ctxvault-sdk 0.1.1
Python SDK for CtxVault — Persistent Memory for AI
License: MIT
Requires Python: >=3.8
Keywords: ai, llm, memory, context, vector-search

# ctxvault

Python SDK for [CtxVault](https://ctxvault.dev) — Persistent Memory for AI.

## Install

```bash
pip install ctxvault
```

## Usage

```python
from ctxvault import CtxVault

vault = CtxVault(
    api_key="cv_your_key",
    project="your-project",
    base_url="https://ctxvault.dev",
)

# Store a memory
vault.remember(
    type="decision",
    title="Use PostgreSQL for persistence",
    content="Chose PostgreSQL with pgvector for vector search support.",
    tags=["database", "architecture"],
)

# Search memories
results = vault.recall("database decisions")

# Get context pack
pack = vault.context_pack("project architecture")
print(pack["pack"])

# List all memories
items = vault.list(status="verified")
```

## API

### `CtxVault(api_key, project, base_url=None)`

### `vault.remember(type, title, content, importance=5, tags=None)` — Store a memory
### `vault.recall(query, k=5)` — Search memories
### `vault.context_pack(query, max_tokens=2000)` — Generate context pack
### `vault.list(status=None, type=None)` — List memory items
### `vault.verify(id)` — Verify a candidate
### `vault.pin(id)` — Pin a verified item
### `vault.deprecate(id, reason)` — Deprecate an item

## License

MIT
osint-darkweb-pkg 0.1.0
A Darkweb OSINT tool for scraping and searching onion sites.
License: MIT
Requires Python: >=3.8

# Darkweb OSINT Package

A modular Open Source Intelligence (OSINT) tool designed to search and scrape data from the Darkweb (Tor network). This package aggregates results from multiple darkweb search engines and provides a concurrent scraper to extract content from `.onion` sites.

## Features

* **Multi-Engine Search:** Queries 15+ darkweb search engines (Ahmia, Torch, OnionLand, etc.) concurrently.
* **Concurrent Scraping:** Rapidly extracts text content from multiple `.onion` URLs simultaneously.
* **Tor Integration:** Built-in SOCKS5 proxy configuration for seamless routing through the Tor network.
* **User-Agent Rotation:** Randomizes user agents to minimize blocking.

## Prerequisites

**Crucial:** You must have the Tor service running on your machine for this package to function. This package routes traffic through the local Tor SOCKS5 proxy (default port `9050`).

* **Linux (Debian/Ubuntu):**
    ```bash
    sudo apt install tor
    sudo service tor start
    ```
* **Windows:**
    Download the [Tor Browser](https://www.torproject.org/download/) or the Tor Expert Bundle and ensure it is running.

## Installation

This package is managed via `pyproject.toml`. You can install it directly:

```bash
pip install osint-darkweb.pkg
```


### Usage
** 1. Searching**
Search for a keyword across multiple hidden service search engines.

from osint_darkweb_pkg import get_search_results

query = "example query"
# Returns a list of dictionaries: [{'title': '...', 'link': '...'}]
results = get_search_results(query)

print(f"Found {len(results)} links.")

** 2. Scraping**
Extract text content from a list of .onion URLs.
from osint_darkweb_pkg import scrape_multiple

# specific .onion links or results from the search step
urls = [
    {'link': '[http://example1.onion](http://example1.onion)', 'title': 'Example 1'},
    {'link': '[http://example2.onion](http://example2.onion)', 'title': 'Example 2'}
]

# Returns a dictionary: {'[http://example1.onion](http://example1.onion)': 'Page content...'}
data = scrape_multiple(urls)

for url, content in data.items():
    print(f"URL: {url}\nContent: {content[:100]}...\n")
    

## Structure 
    search.py: Handles sending queries to search engine endpoints and parsing results.

    scrape.py: Handles visiting specific .onion URLs and extracting text.

    utils.py: Manages shared resources like Tor proxy configuration and User-Agent rotation.

## Disclaimer
    This tool is intended for educational and research purposes only (e.g., security research, OSINT investigations). The authors are not responsible for any misuse of this tool. Accessing the dark web may be illegal or monitored in certain jurisdictions. Use responsibly.