semvec/pypi-packages huggingface dataset:
icij-common 0.7.3
Common utils for ICIJ libs
Requires Python: ~=3.10

[![Test for icij-common](https://github.com/ICIJ/icij-python/actions/workflows/tests-common.yml/badge.svg)](https://github.com/ICIJ/icij-python/actions/workflows/tests-common.yml)

# Library for utilities commonly used in ICIJ's Python projects

## [`neo4j`](https://neo4j.com/docs/api/python-driver/current/)

- neo4j test utils (useful `pytest` fixtures)
- lightweight migration lib
- handles enterprise support and multiple neo4j DBs

## `logging`

## [`pydantic`](https://github.com/pydantic/pydantic)

- ICIJ's Pydantic models

## `tests`

- common test utils and pytest fixtures
kosmos-cli 0.2.1
A powerful CLI tool for interacting with Kosmos knowledge base system
Requires Python: >=3.7

# Kosmos CLI

A powerful command-line interface for interacting with the Kosmos knowledge base system.

## Installation

```bash
pip install kosmos-cli
```

## Usage

After installation, you can use the `kosmos` command:

```bash
kosmos --help
```

### Available Commands

- `login` - Authenticate with the Kosmos server
- `search` - Search for documents and content
- `read` - Read document content
- `document` - Manage documents
- `asset` - Manage assets
- `job` - Manage background jobs
- `logs` - View system logs

## Configuration

Set environment variables for authentication:

```bash
export KOSMOS_USERNAME=your_username
export KOSMOS_PASSWORD=your_password
export KOSMOS_BASE_URL=https://your-kosmos-server.com
```

## Development

To install from source:

```bash
git clone https://github.com/IndenScale/Kosmos.git
cd Kosmos
pip install -e .
```

## License

MIT License
prestmit 0.1.1
A simple, async-first wrapper for the Prestmit crypto wallet balance API.
Requires Python: >=3.8

# Prestmit API Wrapper

A simple Python wrapper for the Prestmit crypto wallet balance API, with support for both synchronous and asynchronous clients. Fetches full balance details, including the complete transaction list.

## Installation

```bash
pip install prestmit
```

## Asynchronous Usage

```python
import asyncio
from prestmit import AsyncWalletClient, AddressNotFoundError

async def main():
    async with AsyncWalletClient() as client:
        try:
            btc_balance = await client.get_balance("btc", "bc1qar0srrr7xfkvy5l643lydnw9re59gtzzwf5mdq")

            print(f"Address: {btc_balance.address}")
            print(f"Final Balance: {btc_balance.balance} BTC")
            print(f"Total Transactions: {btc_balance.n_tx}")

            print("\nRecent Transactions:")
            for tx in btc_balance.transactions[:5]: # Print first 5 transactions
                print(f"  - Hash: {tx.tx_hash[:10]}..., Value: {tx.value}, Confirmations: {tx.confirmations}")

        except AddressNotFoundError as e:
            print(e)

if __name__ == "__main__":
    asyncio.run(main())
```

## Synchronous Usage

```python
from prestmit import SyncWalletClient, AddressNotFoundError

def main():
    with SyncWalletClient() as client:
        try:
            eth_balance = client.get_balance("eth", "0xde0B295669a9FD93d5F28D9Ec85E40f4cb697BAe")
            print(f"ETH Balance: {eth_balance.balance} ETH")
            if eth_balance.transactions:
                print(f"First transaction hash: {eth_balance.transactions[0].tx_hash}")


        except AddressNotFoundError as e:
            print(e)

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

## Data Objects

A successful call returns a `WalletBalance` object containing a list of `Transaction` objects.

### `WalletBalance` Attributes
- `address` (str)
- `crypto_type` (str)
- `balance` (float)
- `total_received` (float)
- `total_sent` (float)
- `n_tx` (int)
- `transactions` (List[Transaction])

### `Transaction` Attributes
- `tx_hash` (str)
- `block_height` (int)
- `value` (float)
- `ref_balance` (float)
- `confirmations` (int)
- `confirmed_at` (str)
- `double_spend` (bool)
pigwig 0.8.4
a python 3.6+ WSGI framework
Requires Python: >=3.6

# pigwig

a pig wearing a wig is humor  
a wig wearing a pig is heresy  
pigwig is a python 3 WSGI framework  
(blogwig is a sample app. don't put wigs on blogs)

```python
#!/usr/bin/env python3

from pigwig import PigWig, Response

def root(request):
	return Response('hello, world!')

routes = [
	('GET', '/', root),
]

app = PigWig(routes)

if __name__ == '__main__':
	app.main()
```

> As I went to Bonner  
> I met a pig  
> Without a wig,  
> Upon my word and honor.

### FACs (frequent, annoying comments)

1. **tornado-style class-based views are better**  
we think you're wrong (inheritance is a hammer and this problem is no nail),
but it's easy enough to achieve:
	```python
	def routes():
		views = [
			('/', RootHandler),
		]
		handlers = []
		for route, view in views:
			for verb in ['get', 'post']:
				if hasattr(view, verb):
					handlers.append((verb.upper(), route, cbv_handler(view, verb)))
		return handlers

	def cbv_handler(cbv, verb):
		def handler(request):
			return getattr(cbv(request), verb)()
		return handler

	class RootHandler:
		def __init__(self, request):
			self.request = request

		def get(self):
			return Response('hello')
	```
1. **flask-style decorator-based routing is better**  
we think you're wrong (explicit is better than implicit),
but it's easy enough to achieve:
	```python
	routes = []
	def route(path, method='GET'):
		def wrapper(handler):
			routes.append((method, path, handler))
			return handler
		return wrapper

	@route('/')
	def root(request):
		return Response('hello')
	```
1. **django-style integration with an ORM is better**  
you're wrong

[![coverage status](https://coveralls.io/repos/github/raylu/pigwig/badge.svg)](https://coveralls.io/github/raylu/pigwig)