semvec/pypi-packages huggingface dataset:
pyproc2 1.2.2
Python library for reading data from UNIX /proc/ directory


## Short intro
**pyproc2** is Python library for reading data from /proc/ directory.
Of course, it works only on Linux.
### Installation
```
pip install pyproc2
```
## What can it do?
### Find processes
There is only one method for all filters (PID, process name, user name,etc.)
It is called `find()`.
Here are few examples:
**1. By PID**:
```python
import pyproc2
pyproc2.find(1)

```
**2. By process name (can return multiple results)**
```python
import pyproc2
pyproc2.find("python")

```
**3. By user name (or UID or whatever)**
```python
import pyproc2
pyproc2.find(user="root")#Replace "user" to filter  by other properties
```
### Doing things with selected process(es)
**1.Sending signals**
Simple kill:
```python
import pyproc2
pr=pyproc2.find("python")
pr.kill()
```
For other signals, pass `kill()` an argument.
Most common signals have defined own methods:
```python
import pyproc2
pr=pyproc2.find("python")
pr.term() #Or stop() or cont() or whatever
```
**2.Acessing attributes**
```python
import pyproc2
pr=pyproc2.find("python")
cpu=pr.cpu
uid=pr.uid
#etc.
```
**3.Accessing children and parent processes**
```python
import pyproc2
pr=pyproc2.find(1)
cdr=pr.children #get all children
parent=pr.parent #get parent process
p4=pr.parentLevel(4) #equivalent of pr.parent.parent.parent.parent
kid=pr.child(3) #fourth children(sorted by PID)(negative indexes are working,too)
```
**4.Sending data to open fds** (works only as root)
```
import pyproc2
#simple write
pyproc2.find('bash').stdin.write('ls -la')
#simple stdout read
pyproc2.find('bash').stdout.read()
#simple stderr read
pyproc2.find('bash').stderr.read()
#write to fd
pyproc2.find('bash').fds.fd(39).write('hello')
#read from fs
pyproc2.find('bash').fds.fd(39).read()
```

### Duplicating
```python
r = my_process.duplicate()
```
This runs `my_process.command` using subprocess and returns result PID.
### Acess predefined process sets
**1.All processes**
```python
import pyproc2
rn=pyproc2.running
```
**2.All processes, sorted by CPU rate**
```python
import pyproc2
t=pyproc2.top
```
**3.Current process**
```python
import pyproc2
cur=pyproc2.current
```
## License
**pyproc2** is licensed under **GPL License**
## Changelog
### 1.0.2
Initial
### 1.0.3
Improved documentation
### 1.0.4
Improved documentation
### 1.0.5
Bug fixes
### 1.1.0
Speed increased
### 1.1.1
Added `owner` property as equivalent to `user`
### 1.1.2
Added changelog
### 1.1.3
Fixed `ProcessSet.kill()` NotImplementedError bug
### 1.1.4
Added `STOPPED` state
### 1.1.5
Added `current` property
### 1.2.0
Added reading from fds and duplicating
### 1.2.1
Added "strict" argument in fd.py; tests failed on Debian(kthreadd)
### 1.2.2
Fixed OSError: too many open files. Added sudoing on duplicate() and some warnings.
pygems 0.2.0
Python gems core package
Requires Python: >=3.6

# py-gems

[![Build Status](https://app.travis-ci.com/ivangeorgiev/py-gems.svg?branch=main)](https://app.travis-ci.com/ivangeorgiev/py-gems)
[![Documentation Status](https://readthedocs.org/projects/py-gems/badge/?version=latest)](https://py-gems.readthedocs.io/en/latest/?badge=latest)
[![codecov](https://codecov.io/gh/ivangeorgiev/py-gems/branch/main/graph/badge.svg?token=6CJY79O3FB)](https://codecov.io/gh/ivangeorgiev/py-gems)
[![Known Vulnerabilities](https://snyk.io/test/github/ivangeorgiev/py-gems/badge.svg)](https://snyk.io/test/github/ivangeorgiev/py-gems)

# Development

## Installation

```bash
$ pip install -r requirements.txt
```

## Test

```bash
$ pytest
```

## Publish

```bash
$ python -m build
$ twine upload dist/*
```
steamsales 0.2
Wrapper for PrepareYourWallet
Requires Python: >=3.6

# Steam Sales

Python API Wrapper for [PrepareYourWallet](https://prepareyourwallet.com/) service. 

## What is PrepareYourWallet?

See when the next Steam Sale will start and how long remains with our countdown timer. PrepareYourWallet.com is tracking all type of sales on the Steam Store such as holiday, lunar new year, summer, halloween and fall sale.

Valve don’t tend to announce their sales in advance. However, by looking at the previous years we can approximately predict when the next one will be. Sometimes, dates can also leak from multiple sources like PayPal.

## Requirements

[requests](https://pypi.org/project/requests/) - required.

[lxml](https://pypi.org/project/lxml/) - required.

[bs4](https://pypi.org/project/bs4/) - required.

## Installation
```bash
pip3 install steamsales
```
## Usage
```python
from steamsales import info as s

print(
    f'Sale Name: {s.sale_name}' +
    f'Start Date: {s.start_date}' +
    f'End Date: {s.end_date}' +
    f'Countdown: {s.countdown}' +
    f'Status: {s.status}'
)
```
# Changes

## 0.2 (10.12.2021)

* Some minor fixes

## 0.1 (07.12.2021)

* Initial release