initial commit
This commit is contained in:
commit
6c33f35a24
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
\.idea
|
14
main.py
Normal file
14
main.py
Normal file
@ -0,0 +1,14 @@
|
||||
import requests
|
||||
from jinja2 import Template
|
||||
|
||||
|
||||
def package(package_name, template):
|
||||
url = 'https://pypi.org/pypi/{}/json'.format(package_name)
|
||||
info = dict(requests.get(url).json())
|
||||
test_template = Template(open(template).read())
|
||||
|
||||
print(test_template.render(
|
||||
version=info["info"]["version"],
|
||||
summary=info["info"]["summary"],
|
||||
home_page=info["info"]["home_page"],
|
||||
sha256=info["releases"][info["info"]["version"]][0]["digests"]["sha256"]))
|
Loading…
Reference in New Issue
Block a user