Skip to content

Commit

Permalink
Pypi (#1)
Browse files Browse the repository at this point in the history
* Changes for PyPI support.

* Updated Dependancies.

* Added requirements.txt

* Updated README.md

* Update README.md
  • Loading branch information
Dextroz authored Feb 13, 2019
1 parent dd55eba commit 8289ff3
Show file tree
Hide file tree
Showing 6 changed files with 166 additions and 5 deletions.
4 changes: 4 additions & 0 deletions Pipfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,13 @@ verify_ssl = true

[dev-packages]
black = "*"
twine = "*"

[packages]
requests = "*"

[requires]
python_version = "3.7"

[pipenv]
allow_prereleases = true
110 changes: 109 additions & 1 deletion Pipfile.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 11 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,19 +7,25 @@ A light wrapper around the public VirusTotal API.
```
[dev-packages]
black = "*"
twine = "*"
[packages]
requests = "*"
```

```pipenv install```

## TODO
* Add package to PyPi package index.
Or

```pip3 install -r requirements.txt```

Or

```pip3 install virustotal-python```

## Example Usage
```python
from virustotal import Virustotal
from virustotal_python import Virustotal
from pprint import pprint
vtotal = Virustotal("Insert API Key Here.")

Expand Down Expand Up @@ -58,7 +64,8 @@ resp = vtotal.put_comment("ihaveaproblem.info", comment="This website is flagged
```

```python
# Example resp for url_scan()
# Example resp for url_scan().
# Assuming you have already initiated Virustotal() and imported pprint.
resp = vtotal.url_scan("ihaveaproblem.info") # Query a single url.
pprint(resp)
{'json_resp': {'permalink': 'https://www.virustotal.com/url/fd21590d9df715452c8c000e1b5aa909c7c5ea434c2ddcad3f4ccfe9b0ee224e/analysis/1549973453/',
Expand Down
20 changes: 20 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
appdirs==1.4.3
attrs==18.2.0
black==18.9b0
bleach==3.1.0
certifi==2018.11.29
chardet==3.0.4
Click==7.0
docutils==0.14
idna==2.8
pkginfo==1.5.0.1
Pygments==2.3.1
readme-renderer==24.0
requests==2.21.0
requests-toolbelt==0.9.1
six==1.12.0
toml==0.10.0
tqdm==4.31.1
twine==1.12.1
urllib3==1.24.1
webencodings==0.5.1
21 changes: 21 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
from setuptools import setup, find_packages

with open("README.md", "r") as readme:
long_description = readme.read()

setup(
name="virustotal-python",
version="0.0.1",
author="Dextroz",
author_email="[email protected]",
description="A light wrapper around the public VirusTotal API.",
long_description=long_description,
long_description_content_type="text/markdown",
url="https://github.com/Dextroz/virustotal-python",
packages=find_packages(),
classifiers=[
"License :: OSI Approved :: MIT License",
"Programming Language :: Python :: 3",
"Programming Language :: Python :: 3.7"
],
)
1 change: 1 addition & 0 deletions virustotal_python/__init__.py
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
from virustotal_python.virustotal import Virustotal
name = "virustotal-python"

0 comments on commit 8289ff3

Please sign in to comment.