semvec/pypi-packages huggingface dataset:
remote-curl-client 1.4.0
Remote curl-based API requester over SSH
Requires Python: >=3.7

# remote-curl-client

Send HTTP requests **from a remote machine (over SSH) using `curl`**, and receive structured responses locally in Python.

This is useful when:
- The remote network has different routing, VPN access, or firewalls.
- You need to debug connectivity *from the remote host's perspective*.
- You want a lightweight alternative to installing a full API stack remotely.

---

## ✨ Features
- All HTTP methods (`GET`, `POST`, `PUT`, `DELETE`, etc.).
- Pass any additional curl flags.
- Headers, query params, and request bodies (string or JSON dict).
- Follow redirects, toggle SSL verification, set timeouts.
- **Retry with exponential backoff + jitter.**
- Structured `RemoteResponse` object (status, headers, body, raw headers).
- Password or SSH-key auth (Paramiko).

---

## 🚀 Install

From PyPI (after release):
```bash
pip install remote-curl-client
```

---

## 🔧 Quick Start

```python
from remote_curl_client import RemoteCurlClient

client = RemoteCurlClient(
    hostname="10.37.65.78",
    username="user",
    key_filename="~/.ssh/id_rsa",  # or password="..."
)

resp = client.request(
    method="GET",
    url="https://httpbin.org/get",
    params={"q": "remote"},
    headers={"User-Agent": "RemoteCurlClient/1.0"},
    retries=3,
    backoff_factor=0.5,
)

print(resp.status_code)
print(resp.headers)
print(resp.body[:200])
```

---

## 📨 POST JSON

```python
data = {"hello": "remote world"}

resp = client.request(
    method="POST",
    url="https://httpbin.org/post",
    data=data,  # dict -> JSON serialized
    headers={"Authorization": "Bearer token123"},
    timeout=10,
)
```

---

## 🔁 Retries & Backoff

```python
resp = client.request(
    method="GET",
    url="https://httpbin.org/status/500",
    retries=4,          # total attempts = 1 + 4 = 5
    backoff_factor=1.0, # 1s, 2s, 4s, 8s...
    max_backoff=5.0,    # cap
)
```

---

## ⚙️ Extra curl flags

Anything curl supports can be passed through:
```python
resp = client.request(
    method="GET",
    url="https://example.com",
    curl_args=["--compressed", "--http2"],
)
```

---

## 🔐 SSH with Password
```python
client = RemoteCurlClient(
    hostname="10.37.65.78",
    username="user",
    password="your_password"
)
```

---

## 🧪 Testing Locally Against localhost
If you have SSH to localhost and curl installed, you can quickly validate:
```python
client = RemoteCurlClient("localhost", "youruser")
resp = client.request("GET", "https://httpbin.org/get")
print(resp.status_code)
```


---

## 📄 License
MIT License. See `LICENSE`.
dob-cli 1.0.4
DOB CLI for remote command execution with persona-based authentication.
Requires Python: >=3.6

# 🚀 DOB CLI – Secure Remote Command Execution with Persona Authentication

The **DOB CLI** (`dob`) is a secure and extensible command-line interface for executing remote tasks on your infrastructure via signed persona tokens. It supports authenticated command forwarding and secure screenplay execution through configuration files.

---

## ✨ Features

- 🔐 **Persona-Based Authentication** – Execute remote commands using cryptographically signed tokens.
- 📁 **Screenplay File Execution** – Send `.yaml` config files for infrastructure automation.
- 🌐 **Remote Host Execution** – Forward commands from any environment to a central host.
- ⚙️ **Simple Configuration** – Configure once with `dob config`, then just run.

---

## 📦 Installation

### ✅ From PyPI (Recommended)

Install using pip:

```bash
pip install dob-cli
```

> Requires Python 3.6+

---

## 🔧 Configuration

Before executing any commands, configure your persona and host using:

```bash
dob config --persona-name <name> \
           --token <persona_token> \
           --private-key-path <path_to_private.pem> \
           --host-endpoint <http://host>
```

This creates a config file at:

```
~/.dobconfig.json
```

Example:

```bash
dob config \
  --persona-name alice_dev \
  --token 1234-abcd-token \
  --private-key-path ~/.ssh/alice_private.pem \
  --host-endpoint http://dob-819914.user.devops-bot.online/persona/api
```

---

## 🚀 Usage

### 1. Run a remote command

```bash
dob vault show
```

This will forward: `dob vault show` to your remote host via secure signed request.

---

### 2. Run a command with screenplay file

```bash
dob aws screenplay --file-path ec2.yaml
```

If `--file-path` is included, the file content will be read and sent inline.

---

## 🧪 Example

```bash
dob persona create \
  --name frontend \
  --role deploy \
  --namespace staging
```

or

```bash
dob aws screenplay --file-path ./infra/ec2.yaml
```

---

## 🛠 How It Works

1. `dob config` saves credentials + host endpoint to `~/.dobconfig.json`.
2. `dob` signs your token with the private key.
3. Command and file content (if any) are sent to the host via HTTP POST.
4. Host authenticates, executes, and returns output.

---

## ❓ Troubleshooting

- **Config file not found**  
  Run `dob config` first to generate `~/.dobconfig.json`.

- **Auth failed?**  
  Ensure token and private key match and host is reachable.

- **File not sent?**  
  Use `--file-path` with absolute or valid relative path.

---

## 💡 Development

Clone the repo and install in editable mode:

```bash
git clone https://github.com/Devops-Bot-Official/dob-cli.git
cd dob-cli
pip install -e .
```

---

## 📄 License

MIT License © 2025 Dee Empire GmbH / DevOps-Bot
ddfem 1.0.12
Diffuse domain finite element solver
Requires Python: >=3.9

# Diffuse Domain Finite Element Methods

[ddfem][0] is a Python package that simplifies the transformation
of a wide range of PDEs using the Diffuse Domain Method.
While the original PDE will often be defined on a complex domain,
after the transformation it can be solved on simple e.g. square domain.
The original geometry is embedded in the simpler domain using
a phase-field function representation.
We provide implementations for different versions of the Diffuse Domain Method
making it easy to compare and chose the most suitable version for the problem at hand.
Adding new versions is also straightforward.
Furthermore, we provide a new approach
to combine multiple boundary conditions
of different types on distinct boundary segments.

The geometry subpackage provides several simple signed distance functions (SDF),
and operators to allow an easy definition of the complex domain.

We have designed the package to have a wide compatibility with existing finite element solvers,
as all transformations are performed using the Unified Form Language,
[UFL][2] and do not require any other external packages. 

While not required, we recommend using [Dune-Fem][1]
as it enables some optimisations for form compiling,
and can improve the mesh by utilising the different grid views.
We have used this package to test the package and
for all examples used throughout this tutorial.

## Getting started

How to install the package using `pip` is discussed in our [tutorial][4].

Enjoy - and let us know of any [issues][3] you encountered 

[0]: https://ddfem.readthedocs.io/en/latest/index.html
[1]: https://www.dune-project.org/modules/dune-fem/
[2]: https://github.com/FEniCS/ufl
[3]: https://gitlab.dune-project.org/dune-fem/ddfem/-/issues
[4]: https://ddfem.readthedocs.io/en/latest/installation.html