Skip to content

Commit 5513b75

Browse files
First working prototype.
0 parents  commit 5513b75

9 files changed

+146
-0
lines changed

.gitignore

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# use glob syntax
2+
syntax: glob
3+
4+
*.elc
5+
*.pyc
6+
*~
7+
*.db
8+
9+
.idea/
10+
11+
build/*
12+
pyAndroZoo.egg-info/*
13+
dist/*
14+
15+
.coverage
16+
17+
docs/_build
18+
19+
# Emacs
20+
eproject.cfg
21+
22+
# Temporary files (vim backups)
23+
*.swp
24+
25+
# Log files:
26+
*.log
27+
28+
# Vagrant:
29+
.vagrant/
30+
31+
# Virtualenv
32+
venv
33+
build

CHANGELOG.rst

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
Release History
2+
===============
3+
4+
0.1 (2017-03-28)
5+
----------------
6+
7+
* first working prototype.

MANIFEST.in

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# binary files
2+
#recursive-include bin *
3+
4+
#Misc
5+
include COPYING
6+
include README.rst
7+
include CHANGELOG.rst
8+
include requirements.txt

README.rst

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
pyAndroZoo
2+
==========
3+
4+
5+
Installation
6+
------------
7+
8+
.. code:: bash
9+
10+
$ sudo pip install pyAndroZoo
11+
12+
13+
Usage
14+
-----
15+
16+
17+
Contact
18+
-------
19+
20+
`Cédric Bonhomme <https://www.cedricbonhomme.org>`_

pyandrozoo/__init__.py

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
2+
from .api import pyAndroZoo

pyandrozoo/api.py

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/usr/bin/env python
2+
#-*- coding: utf-8 -*-
3+
4+
import requests
5+
6+
ANDROZOO_URL = 'https://androzoo.uni.lu/api/download'
7+
8+
class pyAndroZoo():
9+
def __init__(self, apikey, url=ANDROZOO_URL):
10+
self.root_url = url
11+
self.apikey = apikey
12+
self.payload = {'apikey': apikey}
13+
14+
def get(self, sha256):
15+
payload = {'sha256': sha256}
16+
payload.update(self.payload)
17+
with open(sha256+'.apk', "wb") as apk_file:
18+
r = requests.get(self.root_url, payload)
19+
apk_file.write(r.content)
20+
return r

requirements.txt

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
requests

setup.cfg

+2
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
[metadata]
2+
description-file = README.rst

setup.py

+53
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
#!/usr/bin/python
2+
# -*- coding: utf-8 -*-
3+
4+
import os
5+
import sys
6+
import shutil
7+
8+
try:
9+
from setuptools import setup
10+
except ImportError:
11+
from distutils.core import setup
12+
13+
packages = [
14+
'pyandrozoo'
15+
]
16+
17+
scripts = [
18+
]
19+
20+
requires = ['requests']
21+
22+
with open('README.rst', 'r') as f:
23+
readme = f.read()
24+
with open('CHANGELOG.rst', 'r') as f:
25+
changelog = f.read()
26+
27+
setup(
28+
name='pyAndroZoo',
29+
version='0.1',
30+
author='Cédric Bonhomme',
31+
author_email='[email protected]',
32+
packages=packages,
33+
include_package_data=True,
34+
scripts=scripts,
35+
url='https://github.com/ICC-analysis/pyAndroZoo',
36+
description='Client to access the AndroZoo data set.',
37+
long_description=readme + '\n|\n\n' + changelog,
38+
platforms = ['Linux'],
39+
license='GPLv3',
40+
install_requires=requires,
41+
zip_safe=False,
42+
classifiers=[
43+
'Development Status :: 5 - Production/Stable',
44+
'Environment :: Console',
45+
'Intended Audience :: Developers',
46+
'Intended Audience :: Science/Research',
47+
'Topic :: Security',
48+
'Operating System :: OS Independent',
49+
'Programming Language :: Python :: 3.5',
50+
'Programming Language :: Python :: 3.6',
51+
'License :: OSI Approved :: GNU General Public License v3 or later (GPLv3+)'
52+
]
53+
)

0 commit comments

Comments
 (0)