requires42.com cli
Project description
Installation
$ [sudo] pip install requires42
Examples
$ export REQUIRES42_TOKEN=XXX # https://requires42.com/token/
$ requires42 . > requirements.txt
$ requires42 . | awk -F '=' '{print $1}' > requirements.txt # without versions
curl api:
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:
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
requires42-2020.12.3.tar.gz
(1.9 kB
view details)
File details
Details for the file requires42-2020.12.3.tar.gz
.
File metadata
- Download URL: requires42-2020.12.3.tar.gz
- Upload date:
- Size: 1.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.2.0 pkginfo/1.6.0 requests/2.24.0 setuptools/50.3.0 requests-toolbelt/0.9.1 tqdm/4.50.2 CPython/3.8.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 186fe08457de98e938bcd3fa3a70915649efa58087d33dd7130bda03c6d16dea |
|
MD5 | 91f9389c464b6392415b9573284e5090 |
|
BLAKE2b-256 | 47a068e3ad0bcc0c34d9c7c6e8eed54d309c61c174b2074ebd15727b7bada1ff |