semvec/pypi-packages huggingface dataset:
pyaphid 0.3.1
Identify unwanted function calls in your code
License: MIT
Requires Python: >=3.8,<4.0

# Pyaphid

[![PyPI version](https://badge.fury.io/py/pyaphid.svg)](https://badge.fury.io/py/pyaphid)
[![GitHub license](https://img.shields.io/github/license/jvllmr/pyaphid)](https://github.com/jvllmr/pyaphid/blob/master/LICENSE)
[![GitHub issues](https://img.shields.io/github/issues/jvllmr/pyaphid)](https://github.com/jvllmr/pyaphid/issues)
![PyPI - Downloads](https://img.shields.io/pypi/dd/pyaphid)
![Tests](https://github.com/jvllmr/pyaphid/actions/workflows/main.yml/badge.svg)
![Codecov](https://img.shields.io/codecov/c/github/jvllmr/pyaphid?style=plastic)

## Description

Pyaphid is a static analysis tool for detecting unwanted function calls in Python code.

## Installation and usage

Installation: `pip install pyaphid`

Usage: `python -m pyaphid <files and/or directories to analyze>` or `pyaphid <files and/or directories to analyze>`

### Configuration

Forbidden function calls can be configured via the `pyproject.toml`:

```toml
[tool.pyaphid]
forbidden = [
    "print", # forbid print(...)
    "pdb.run", # forbid pdb.run(...)
    "werkzeug.debug.*", # forbid werkzeug.debug.DebuggedApplication(...), werkzeug.debug.get_machine_id(...), ...
    "datetime.datetime.now" # forbid datetime.now()
]
```

With datetime.now for example you usually want to ignore one call to it for implementing a project-wide default function. You can use `# pyaphid: ignore` to ignore a line:

```python
from dateutil.tz import tzlocal
from datetime import datetime

def get_now():
  # allowed
  return datetime.now(tzlocal()) # pyaphid: ignore

datetime.now() # forbidden

```

### CLI Options

- -n / --names: `Look-up all func calls and print their identifier`

## As a pre-commit hook

```yaml
- repo: https://github.com/jvllmr/pyaphid
  rev: v0.3.1
  hooks:
    - id: pyaphid
```

## Limitations

```python
# Pyaphid cannot work with star imports
from os.path import *
dirname(".") # undetected

# Pyaphid doesn't track assignments
my_print = print
my_print("Hello world") # undetected
```
talos-linux-api-v1.3.0 0.1.0
Python bindings for the Talos Linux gRPC API (v1.3.0)
License: MIT
Requires Python: >=3.7

# `talos-linux-api` - Python bindings for the Talos Linux gRPC API

## Installation
Multiple API versions can be installed simultaneously and are made available
at runtime under an *Implicit Namespace Package* named `talos_linux_api`.

Currently available API versions:

* `pip install talos-linux-api-v1.2.0`
* `pip install talos-linux-api-v1.3.0`


## Usage example
```python
import ssl
from talos_linux_api.v1_3_0.machine import MachineServiceStub
from grpclib.client import Channel
from betterproto.lib.google.protobuf import Empty

ssl_context = ssl.create_default_context()
ssl_context.load_cert_chain('client.crt', 'client.key')
ssl_context.load_verify_locations('ca.crt')

async with Channel(host="example.com", port=50000, ssl=ssl_context) as channel:
    machine_service = MachineServiceStub(channel)
    response = await machine_service.cpu_info(Empty())
```
talos-linux-api-v1.2.0 0.1.0
Python bindings for the Talos Linux gRPC API (v1.2.0)
License: MIT
Requires Python: >=3.7

# `talos-linux-api` - Python bindings for the Talos Linux gRPC API

## Installation
Multiple API versions can be installed simultaneously and are made available
at runtime under an *Implicit Namespace Package* named `talos_linux_api`.

Currently available API versions:

* `pip install talos-linux-api-v1.2.0`


## Usage example
```python
import ssl
from talos_linux_api.v1_2_0.machine import MachineServiceStub
from grpclib.client import Channel
from betterproto.lib.google.protobuf import Empty

ssl_context = ssl.create_default_context()
ssl_context.load_cert_chain('client.crt', 'client.key')
ssl_context.load_verify_locations('ca.crt')

async with Channel(host="example.com", port=50000, ssl=ssl_context) as channel:
    machine_service = MachineServiceStub(channel)
    response = await machine_service.cpu_info(Empty())
```