semvec/pypi-packages huggingface dataset:
shebang 2020.12.3
get script shebang
License: Unlicense
Keywords: shebang

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


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

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

#### Examples
```python
>>> import shebang

>>> shebang.get("path/to/file.py")
'/usr/bin/env python'

>>> shebang.get("path/to/file.txt")
None

>>> shebang.get("/bin/ls")
None
```

```bash
$ python -m shebang file.py
/usr/bin/env python
```

<p align="center">
    <a href="https://readme42.com/">readme42.com</a>
</p>
setupcfg 2020.12.3
setup.cfg helper
License: Unlicense
Keywords: setup.cfg setuptools setup

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


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

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

#### Related
+   [`classifiers-generator` - classifiers generator](https://pypi.org/project/readme-docstring/)
+   [`readme-badges` - `README.md` badges](https://pypi.org/project/readme-badges/)
+   [`readme-docstring` - generate README.md from python docstrings](https://pypi.org/project/readme-docstring/)
+   [`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/)

#### Links
+   [metadata, options - setuptools documentation](http://setuptools.readthedocs.io/en/latest/setuptools.html#metadata)
+   [Specifying values](http://setuptools.readthedocs.io/en/latest/setuptools.html#specifying-values)

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

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


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

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

#### Features
`[metadata]`|files/environment variables
-|-
`name`|current directory basename or `$NAME`
`classifiers`|`classifiers.txt`, `$CLASSIFIERS`
`description`|`description.txt`, `$DESCRIPTION`
`keywords`|`keywords.txt`, `$KEYWORDS`
`long_description`|`README.md`/`README.rst`, `$LONG_DESCRIPTION`
`long_description_content_type`|`text/markdown` if `long_description` is `.md` file
`version`|`version.txt`, `$VERSION`
`url`|`$URL`

`[options]`|files/environment variables
-|-
`install_requires`|`requirements.txt`
`packages`|`setuptools.find_packages()`result, folders with `__init__.py`
`py_modules`|python files in a current directory
`scripts`|`bin/*` or `scripts/*` files

files can be in the current directory or any subdirectory

#### Examples
```
project-name.py/
├── bin
|   └── script
├── classifiers.txt
├── description.txt
├── subfolder/keywords.txt
├── requirements.txt
├── module.py
├── package
|   └── __init__.py
├── README.md
├── scripts
|   └── script
├── setup.py
├── subfolder/version.txt
```

```bash
$ cd path/to/project-name.py
$ export URL="https://github.com/owner/repo"
$ python -m setupcfg_generator
$ cat setup.cfg
[metadata]
name = project-name
version = 1.0.0
url = https://github.com/owner/repo
classifiers = file: classifiers.txt
description = file: description.txt
long_description = file: README.md
long_description_content_type = text/markdown
keywords = key1 key2

[options]
install_requires =
    req1
    req2
packages =
    pkgname
py_modules =
    module
scripts =
    bin/script
    scripts/script
```

#### Related
+   [`setuppy-generator` - `setup.py` generator](https://pypi.org/project/setuppy-generator/)

<p align="center">
    <a href="https://readme42.com/">readme42.com</a>
</p>
setup-prod 2020.7.2
setup.py production
License: Unlicense
Keywords: setup prod

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



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

### Installation
```bash
$ [sudo] pip install setup-prod
```

### Concept
pypi/prod `setup.py` without unnecessary metadata

#### Features
`MANIFEST.in`
```
include requirements.txt
exclude MANIFEST.in
```

#### Examples
```bash
name=$(IFS=.;set ${PWD##*/};echo $1)
version="..."
setup-prod "$name" "$version" > setup.py
```

```python
import setuptools

setuptools.setup(
    name='NAME',
    version='VERSION',
    install_requires=open('requirements.txt').read().splitlines(),
    packages=setuptools.find_packages()
)
```

environment variables
```bash
name=$(IFS=.;set ${PWD##*/};echo $1)
version="..."
scripts="$(find scripts -type f)"
export SETUP_SCRIPTS="$scripts"
setup-prod "$name" "$version" > setup.py
```

```python
import setuptools

setuptools.setup(
    name='NAME',
    version='VERSION',
    install_requires=open('requirements.txt').read().splitlines(),
    packages=setuptools.find_packages(),
    scripts=['scripts/file1','scripts/file2']
)
```

<p align="center">
    <a href="https://readme42.com/">readme42.com</a>
</p>
setup-dist 2020.12.3
setup module for distributions: python -m setup_dist sdist --dist-dir=<dist_dir>
License: Unlicense
Keywords: setup dist sdist distribution

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


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

### Installation
```bash
$ [sudo] pip install setup-dist
```

### Concept
pypi/prod `setup.py` without unnecessary metadata (`keywords`, `description`, `long_description`, `classifiers`, `url`, etc)

#### Pros
+   less production code and commits

#### How it works
project metadata is stored in the distribution `PKG-INFO` file

#### Usage
```bash
$ usage: python -m setup_dist ...
```

#### Features
key|default value|environment variable
-|-|-
`name`|`os.path.basename(os.getcwd()).split(".")[0].lower()`|`SETUP_NAME`
`version`|`None`|`SETUP_VERSION`
`packages`|`setuptools.find_packages()`|`SETUP_PACKAGES`
`install_requires`|`requirements.txt` lines|`SETUP_INSTALL_REQUIRES` or `SETUP_INSTALL_REQUIRES_FILE`
`classifiers`|`classifiers.txt` lines|`SETUP_CLASSIFIERS` or `SETUP_CLASSIFIERS_FILE`
`scripts`|`scripts/` files|`SETUP_SCRIPTS`
`keywords`|`None`|`SETUP_KEYWORDS` or `SETUP_KEYWORDS_FILE`
`description`|`None`|`SETUP_DESCRIPTION`
`long_description`|`README.md` or `README.rst` content|`SETUP_LONG_DESCRIPTION` or `SETUP_LONG_DESCRIPTION_FILE`
`license`|`None`|`SETUP_LICENSE`
`url`|`None`|`SETUP_URL`

#### Examples
```bash
dist_dir="$(mktemp -d)"
export SETUP_VERSION="42"
export SETUP_DESCRIPTION="Answer to the Ultimate Question of Life, the Universe, and Everything"
python -m setup_dist sdist --dist-dir="$dist_dir"  1> /dev/null
```

twine upload
```bash
sdist="$(find "$dist_dir" -type f -name "*.tar.gz")"
twine upload --config-file=~/.pypirc "$sdist"
```

pypi/prod `setup.py`
```python
import setuptools

setuptools.setup(
    name='NAME',
    install_requires=open('requirements.txt').read().splitlines(),
    packages=setuptools.find_packages()
)
```

<p align="center">
    <a href="https://readme42.com/">readme42.com</a>
</p>
setup-clean 2020.12.3
python setup.py clean replacement
License: Unlicense
Keywords: setup clean

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



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

### Installation
```bash
$ [sudo] pip install setup-clean
```

#### Pros
+   super fast (shell)

#### Usage
```bash
$ usage: setup-clean path
```

#### Examples
```bash
$ setup-clean .
```

clean multiple repositories:
```bash
$ find . -type d -mindepth 1 -maxdepth 1 -exec setup-clean {} \;
```

<p align="center">
    <a href="https://readme42.com/">readme42.com</a>
</p>
self 2020.12.3
@self decorator makes method return self (jQuery-like chaining)
License: Unlicense
Keywords: self decorator

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


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

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

#### Examples
```python
>>> from self import self

>>> class CLS:
	@self
	def method(self):
		...

	@self
	def method2(self):
		...

>>> CLS().method().method2() # jQuery like chain
```

<p align="center">
    <a href="https://readme42.com/">readme42.com</a>
</p>
s3-create-user 2020.12.3
create user and policy for S3 bucket
License: Unlicense
Keywords: S3

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



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

### Installation
```bash
$ [sudo] pip install s3-create-user
```

```bash
$ [sudo] npm i -g s3-create-user
```

#### Pros
+   create S3 bucket user, policy and access key

#### Examples
```bash
$ s3-create-full-access-user bucket_name
$ s3-create-read-only-user bucket_name
```

<p align="center">
    <a href="https://readme42.com/">readme42.com</a>
</p>
runcmd 2020.12.3
run shell command
License: Unlicense
Keywords: run command

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


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

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

#### Examples
```python
>>> import runcmd
>>> r = runcmd.run(["echo", "hello world"])
>>> r.code  # exit status code
0
>>> r.out  # stdout
'hello world'
>>> r.err  # stderr
''
>>> r.pid  # process pid
1234
```

`background=True`
```python
>>> r = runcmd.run(["sleep","5"],background=True)
>>> while r.running:  # True if process is running and not "zombie process"
>>>     print("running")
```
`kill(signal=None)` - kill process
```python
>>> r.kill(-9)
```

`exc()` - raise exception if code is not `0`
```python
>>> runcmd.run(["ls"]).exc()              # code 0, ok
>>> runcmd.run(["mkdir", "/"]).exc()      # code 1, raise OSError
...
OSError: exited with code 1
mkdir: /: Is a directory
```

<p align="center">
    <a href="https://readme42.com/">readme42.com</a>
</p>
rstvalidator 2020.12.3
.rst (reStructuredText) validator
License: Unlicense
Keywords: rst reStructuredText validator

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


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

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

#### Examples
```bash
$ python -m rstvalidator README.rst
```

<p align="center">
    <a href="https://readme42.com/">readme42.com</a>
</p>
rreplace 2020.12.3
rreplace(string,old,new,count=None) - right replace
License: Unlicense
Keywords: rreplace replace

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


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

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

#### Examples
```python
>>> import rreplace

>>> rreplace.rreplace('old_old','old','new',1))
'old_new'
```

<p align="center">
    <a href="https://readme42.com/">readme42.com</a>
</p>
rmdir 2020.12.3
recursively delete empty directories
License: Unlicense
Keywords: rmdir

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


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

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

#### Examples
```bash
$ find . -depth -type d -exec rmdir {} \; 2>/dev/null
```

```python
>>> import rmdir
>>> rmdir.rmdir(".")
```

<p align="center">
    <a href="https://readme42.com/">readme42.com</a>
</p>
requires42 2020.12.3
requires42.com cli
License: Unlicense
Keywords: requires42 requires requirements

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



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

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

#### Examples
```bash
$ export REQUIRES42_TOKEN=XXX # https://requires42.com/token/
$ requires42 . > requirements.txt
$ requires42 . | awk -F '=' '{print $1}' > requirements.txt # without versions
```

curl api:
```bash
set -- curl -s -X POST -H "Authorization: Token $REQUIRES42_TOKEN"
files="$(find "$PWD" -type f -not -path "$PWD/tests/*" -name "*.py" -type f)"
[[ -n "$files" ]] && while IFS= read f; do
    set -- "$@" -F "file[]=@$f"
done <<< "$files"
set -- "$@" https://api.requires42.com/requires
"$@" . > requirements.txt
```

python api:
```python
import requests

url = 'https://api.requires42.com/requires'
headers = {'Authorization': 'Token REQUIRES42_TOKEN'}

files = {
    'package/__init__.py': open('package/__init__.py','rb'),
    'package/base.py': open('package/base.py','rb')
}
r = requests.post(url,headers=headers,files=files)
open('requirements.txt','w').write(r.text)
```

#### Links
+   [requires42.com](https://requires42.com/)

<p align="center">
    <a href="https://readme42.com/">readme42.com</a>
</p>
requests-etag-cache 2020.12.3
requests etag cache
License: Unlicense
Keywords: requests cache

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


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

### Installation
```bash
$ [sudo] pip install requests-etag-cache
```

#### How it works
```
$REQUESTS_ETAG_CACHE/<url_hash>
```

`$XDG_CACHE_HOME/requests-etag-cache/<url_hash>` by default

#### Examples
```python
import requests
import requests_etag_cache

r = requests.get('https://pypi.org/project/requests/')
if not requests_etag_cache.uptodate(r):
    ...
    requests_etag_cache.save(r)
```

<p align="center">
    <a href="https://readme42.com/">readme42.com</a>
</p>
requests-api-pagination 2020.12.3
requests rfc5988 api pagination
License: Unlicense
Keywords: requests rfc5988 api pagination

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


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

### Installation
```bash
$ [sudo] pip install requests-api-pagination
```

#### Examples
```python
import requests_api_pagination

url='https://api.github.com/gists?per_page=100'
headers = {"Authorization": "Bearer %s" % GITHUB_TOKEN}

requests_api_pagination.get(url,headers=headers)
```

<p align="center">
    <a href="https://readme42.com/">readme42.com</a>
</p>
repo-config 2020.12.3
store repo config in dotfiles
License: Unlicense
Keywords: repo config

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



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

### Installation
```bash
$ [sudo] pip install repo-config
```

```bash
$ [sudo] npm i -g repo-config
```

#### How it works
`path/to/repo/.config/` - repo config

git@host:**owner/repo**.git - git remote, required for save/load

`~/.config/repo-config/owner/repo/` - dotfiles

#### Features
+   store repos config in dotfiles
    +   **exclude unwanted files from commit**
    +   you can symlink dotfiles to a special backup repo
    +   easy to perform search and commands

#### Config
```bash
$ echo "/.config" >> ~/.gitignore
```

optional. environment variables:
```bash
$ export REPO_CONFIG_HOME=~/.config/repo-config     # $XDG_CONFIG_HOME/repo-config by default
$ export REPO_CONFIG_DIR=.config                    # .config by default
```

#### Examples
```bash
$ cd path/to/repo
$ repo-config init .
$ ... # generate and edit config/tmp files
$ repo-config save .
.config/ saved to ~/.config/repo-config/owner/repo
$ repo-config load .
.config/ loaded from ~/.config/repo-config/owner/repo
```


symlink dotfiles to a special backup repository:

```bash
$ ln -fs path/to/backup-repository/repo-config ~/.config/repo-config
```

##### save/load multiple repos config
```bash
$ find ~/git -type d -maxdepth 1 -exec repo-config save {} \;
$ find ~/git -type d -maxdepth 1 -exec repo-config load {} \;
```

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

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


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

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

#### Examples
```python
import replace
>>> replace.replace(["3.6","3.7","3.8"], {"3.7": "3.7-dev", "3.8": "3.8-dev"})
["3.6","3.7-dev","3.8-dev""3.8"]
```

```python
>>> replace.replace("package/module.py", {"/": ".", ".py": ""})
"package.module"
```

<p align="center">
    <a href="https://readme42.com/">readme42.com</a>
</p>
refork 2020.12.3
re-fork git repo
License: Unlicense
Keywords: refork git

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



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

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

```bash
$ [sudo] npm i -g refork
```

#### Examples
```bash
$ cd path/to/forked-repo
$ refork git@github.com:wbond/package_control_channel.git # url required 1 time only
```

<p align="center">
    <a href="https://readme42.com/">readme42.com</a>
</p>
recursion-detect 2020.12.3
detect recursion
License: Unlicense

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


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

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

#### Examples
```python
>>> import recursion_detect
>>> def recur():
    depth = recursion_detect.depth()
    print("depth = %s" % depth)
    if depth==5:
        return
    recur()

>>> recur()
0
1
2
3
4
```

<p align="center">
    <a href="https://readme42.com/">readme42.com</a>
</p>
readme-docstring 2020.12.3
generate README from python docstrings
License: Unlicense
Keywords: readme docstring

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


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

### Installation
```bash
$ [sudo] pip install readme-docstring
```

#### Examples
example with [readme-generator](https://pypi.org/project/readme-generator/)
```python
class Readme(readme_generator.Readme):
    order = [..., "classes", "functions", ...]

    def classes(self):
        classes = self.getclasses()
        return readme_docstring.Classes(classes)

    def functions(self):
        functions = self.getfunctions()
        return readme_docstring.Functions(functions)
```

custom table
```python
class ExecutableModules(readme_docstring.Table):
    columns = ["usage", "`__doc__`"]

    def __init__(self,modules):
        self.objects = modules

    def getleftcell(self, obj):
        default = "python -m %s" % obj.__name__.replace(".__main__", "")
        return "`%s`" % getattr(obj, "USAGE", default)
```

<p align="center">
    <a href="https://readme42.com/">readme42.com</a>
</p>
pypi-xmlrpc 2020.12.3
pypi XML-RPC
License: Unlicense
Keywords: pypi xmlrpc

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


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

### Installation
```bash
$ [sudo] pip install pypi-xmlrpc
```

#### Examples
`user_packages(user)` `[(role,name),...]`
```python
>>> packages = pypi_xmlrpc.user_packages("kennethreitz") # user packages
>>> for role, name in packages:
```

`package_releases(name)`
```python
>>> pypi_xmlrpc.package_releases("requests")
['x.y.z',..., '0.0.1']
```

`package_roles(name)` `[(role,name),...]`
```python
>>> pypi_xmlrpc.package_roles("requests")
[('role','username'),...]
```

`release_data(name,version)`
```python
>>> pypi_xmlrpc.release_data("requests","x.y.z")
{'name': 'requests',...}
```


`release_urls(name,version)`
```python
>>> pypi_xmlrpc.release_urls("requests","x.y.z")
[...]
```

#### Links
+   [PyPiXmlRpc - PythonInfo Wiki](http://wiki.python.org/moin/PyPiXmlRpc)

<p align="center">
    <a href="https://readme42.com/">readme42.com</a>
</p>
pypi-simple-iter 2020.12.3
pypi simple https://pypi.org/simple/ iterator
License: Unlicense
Keywords: pypi simple

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


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

### Installation
```bash
$ [sudo] pip install pypi-simple-iter
```

#### Examples
```python
import pypi_simple_iter

for slug, name in pypi_simple_iter.iter_projects():
    print(slug,name)
```

iterate from file:
```python
import pypi_simple_iter
import requests

r = requests.get('https://pypi.org/simple/')
open('/tmp/simple.txt','w').write(r.text)
for slug, name in pypi_simple_iter.iter_projects_from_file('/tmp/simple.txt'):
    print(slug,name)
```

```
0 0
0-0 0-._.-._.-._.-._.-._.-._.-0
00000a 00000a
0-0-1 0.0.1
007 007
00print-lol 00print_lol
00smalinux 00SMALINUX
...
```

`startswith`
```python
for slug, name in pypi_simple_iter.iter_projects(startswith='Django'):
    print(slug,name)
```

```
django Django
django10-enumfield django10-enumfield
django1-11-zebra django1.11-zebra
...
```

#### Links
+   [Simple Index](https://pypi.org/simple/)
+   [Simple Project API](https://warehouse.pypa.io/api-reference/legacy/#simple-project-api)

<p align="center">
    <a href="https://readme42.com/">readme42.com</a>
</p>
pypi-rss 2020.12.3
pypi.org rss utils
License: Unlicense
Keywords: pypi.org rss

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


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

### Installation
```bash
$ [sudo] pip install pypi-rss
```

#### Pros
Batteries included:
+   xml and datetime parser
+   requests/xml exceptions catch. ready for production usage! :)

#### Examples
```python
import pypi_rss

for p in pypi_rss.get_newest_packages():
    print(p['pubdate'], p['name'], p['description'])

for p in pypi_rss.get_latest_updates():
    print(p['pubdate'], p['name'], p['version'], p['description'])
```

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