semvec/pypi-packages huggingface dataset:
detect 2020.12.3
detect OS and Python versions
License: Unlicense
Keywords: detect

<!--
https://readme42.com
-->


[![](https://img.shields.io/pypi/v/detect.svg?maxAge=3600)](https://pypi.org/project/detect/)
[![](https://img.shields.io/badge/License-Unlicense-blue.svg?longCache=True)](https://unlicense.org/)

### Installation
```bash
$ [sudo] pip install detect
```

#### Features
##### OS variables

variable|description
-|-
`detect.freebsd`| True if OS is FreeBSD
`detect.linux`| True if OS is Linux
`detect.mac`| True if OS is MacOS
`detect.osx`| True if OS is MacOS OS X
`detect.windows`| True if OS is Windows
`detect.cygwin`| True if OS is Cygwin detected
`detect.unix`| True if OS is Unix (not Windows)

##### Python variables

variable|description
-|-
`detect.py2`| True if python is 2.x
`detect.py3`| True if python is 3.x

##### Docker

variable|description
-|-
`detect.docker`| True if running inside a Docker container

<p align="center">
    <a href="https://readme42.com/">readme42.com</a>
</p>
cp 2020.12.3
cp(source,target,force=True) function
License: Unlicense
Keywords: cp copy

<!--
https://readme42.com
-->


[![](https://img.shields.io/pypi/v/cp.svg?maxAge=3600)](https://pypi.org/project/cp/)
[![](https://img.shields.io/badge/License-Unlicense-blue.svg?longCache=True)](https://unlicense.org/)

### Installation
```bash
$ [sudo] pip install cp
```

#### Examples
```python
>>> import cp

>>> cp.cp(src,dst)
>>> cp.cp(src,dst) # skip, exists
>>> cp.cp(src,dst,force=True) # force cp
```

<p align="center">
    <a href="https://readme42.com/">readme42.com</a>
</p>
control-characters 2020.12.3
remove control characters from a string
License: Unlicense
Keywords: control characters

<!--
https://readme42.com
-->


[![](https://img.shields.io/pypi/v/control-characters.svg?maxAge=3600)](https://pypi.org/project/control-characters/)
[![](https://img.shields.io/badge/License-Unlicense-blue.svg?longCache=True)](https://unlicense.org/)

### Installation
```bash
$ [sudo] pip install control-characters
```

#### Features
fixes `plistlib`  problem with control characters
```python
>>> plistlib.dump(data, open(path, 'wb'))
...
ValueError: strings can't contains control characters; use bytes instead
```

#### Examples
environment variables without control characters:
```python
env = dict((k, control_characters.remove(v)) for k, v in os.environ.items())
```

<p align="center">
    <a href="https://readme42.com/">readme42.com</a>
</p>
commands-generator 2020.12.3
generate shell commands from scripts
License: Unlicense
Keywords: commands scripts

<!--
https://readme42.com
-->



[![](https://img.shields.io/badge/OS-Unix-blue.svg?longCache=True)]()
[![](https://img.shields.io/pypi/v/commands-generator.svg?maxAge=3600)](https://pypi.org/project/commands-generator/)
[![](https://img.shields.io/badge/License-Unlicense-blue.svg?longCache=True)](https://unlicense.org/)

### Installation
```bash
$ [sudo] pip install commands-generator
```

```bash
$ [sudo] npm i -g commands-generator
```

#### How it works
scripts (shebang `#!` required):
```
namespace/script.py
namespace/subnamespace/script.sh
```

generated commands:
```
namespace:script
namespace:subnamespace:script
```

#### Features
+   generate **shell commands from scripts**
+   **shell namespaces** - `namespace:command`. folder names as namespaces

#### Config
`~/.bashrc`:

`export PATH=path/to/commands:$PATH`

#### Examples
generate `~/.local/share/bin` from `dotfiles/scripts`:

```
dotfiles/scripts/git/commit.sh
dotfiles/scripts/files/python/setup.cfg/create.sh
dotfiles/scripts/web/github.com/push.sh
```

```bash
$ cd path/to/dotfiles
$ commands-generator scripts ~/.local/share/bin
```

generated commands:
```
~/.local/share/bin/git:commit
~/.local/share/bin/files:python:setup.cfg:create
~/.local/share/bin/web:github.com:push
```

usage:
```
$ files:python:requirements.txt:create
$ git:commit
$ web:github.com:push
```

#### Related
+   [`classifiers-generator` - python classifiers generator](https://pypi.org/project/classifiers-generator/)
+   [`commands-generator` - shell commands generator](https://pypi.org/project/commands-generator/)
+   [`launchd-generator` - launchd.plist generator](https://pypi.org/project/launchd-generator/)
+   [`readme-generator` - `README.md` generator](https://pypi.org/project/readme-generator/)
+   [`setupcfg-generator` - `setup.cfg` generator](https://pypi.org/project/setupcfg-generator/)
+   [`travis-generator` - `.travis.yml` generator](https://pypi.org/project/travis-generator/)

<p align="center">
    <a href="https://readme42.com/">readme42.com</a>
</p>
cached 2020.12.3
cached(function) - cache function
License: Unlicense
Keywords: cached cache function

<!--
https://readme42.com
-->


[![](https://img.shields.io/pypi/v/cached.svg?maxAge=3600)](https://pypi.org/project/cached/)
[![](https://img.shields.io/badge/License-Unlicense-blue.svg?longCache=True)](https://unlicense.org/)

### Installation
```bash
$ [sudo] pip install cached
```

#### Examples
`@cached` decorator

```python
>>> from cached import cached

>>> @cached
    def func(*args, **kwags):
```

`cached(function)` function
```python
>>> from cached import cached

>>> def func(*args, **kwags):
        ...
>>> cached(func)()
```

<p align="center">
    <a href="https://readme42.com/">readme42.com</a>
</p>
badge 2020.12.3
badge generator
License: Unlicense
Keywords: badge

<!--
https://readme42.com
-->


[![](https://img.shields.io/pypi/v/badge.svg?maxAge=3600)](https://pypi.org/project/badge/)
[![](https://img.shields.io/badge/License-Unlicense-blue.svg?longCache=True)](https://unlicense.org/)

### Installation
```bash
$ [sudo] pip install badge
```

#### Features
+   **md** (default), **rst**, **html**
+   autoformat strings
+   **minimalistic design**

#### Examples
```python
>>> class Travis(badge.Badge):
    title = "Travis"
    image = "https://api.travis-ci.org/{fullname}.svg?branch={branch}"
    link = "https://travis-ci.org/{fullname}/"

>>> Travis(fullname="owner/repo") # .md, Markdown by default
'[![Travis](https://api.travis-ci.org/owner/repo.svg?branch=master)](https://travis-ci.org/owner/repo/)'

>>> Travis(fullname="owner/repo").rst # .rst, reStructuredText
'.. image: : https://api.travis-ci.org/owner/repo.svg?branch=master
    : target: https://travis-ci.org/owner/repo/'
```

<p align="center">
    <a href="https://readme42.com/">readme42.com</a>
</p>
backup-to-s3 2020.12.3
backup to S3
License: Unlicense
Keywords: backup aws s3

<!--
https://readme42.com
-->



[![](https://img.shields.io/badge/OS-Unix-blue.svg?longCache=True)]()
[![](https://img.shields.io/pypi/v/backup-to-s3.svg?maxAge=3600)](https://pypi.org/project/backup-to-s3/)
[![](https://img.shields.io/badge/License-Unlicense-blue.svg?longCache=True)](https://unlicense.org/)

### Installation
```bash
$ [sudo] pip install backup-to-s3
```

```bash
$ [sudo] npm i -g backup-to-s3
```

#### How it works
```
<s3-bucket-name>/<slug>/<year>/<year-month>/<year-month-day>/name-<datetime>.tar.gz
```

#### Config
environment variables (optional):

variable|description|default value
-|-|-
`BACKUP_TO_S3_BUCKET`|s3 bucket name| `backup-to-s3-<account-id>`
`BACKUP_TO_S3_EXCLUDE_FROM`|exclude patterns|`$XDG_CONFIG_HOME/backup-to-s3/exclude.txt`, e.g. `~/.config/backup-to-s3/exclude.txt`

#### Examples
```bash
$ cd ~
$ backup-to-s3 git
```

<p align="center">
    <a href="https://readme42.com/">readme42.com</a>
</p>