Browse Source

Updated to support 2.7

master
Teknikode 5 years ago
parent
commit
31d2d6c874
  1. 2
      setup.cfg
  2. 7
      setup.py
  3. 8
      teknik/uploads.py
  4. 5
      teknik/util.py

2
setup.cfg

@ -0,0 +1,2 @@ @@ -0,0 +1,2 @@
[bdist_wheel]
universal=1

7
setup.py

@ -16,7 +16,7 @@ setup( @@ -16,7 +16,7 @@ setup(
# Versions should comply with PEP440. For a discussion on single-sourcing
# the version across setup.py and the project code, see
# https://packaging.python.org/en/latest/single_source_version.html
version='1.0.5',
version='1.0.7',
description='A library for using the Teknik Services',
long_description=long_description,
@ -48,11 +48,12 @@ setup( @@ -48,11 +48,12 @@ setup(
# Specify the Python versions you support here. In particular, ensure
# that you indicate whether you support Python 2, Python 3 or both.
'Programming Language :: Python :: 2',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3 :: Only',
],
# What does your project relate to?
@ -62,8 +63,6 @@ setup( @@ -62,8 +63,6 @@ setup(
# simple. Or you can use find_packages().
packages=find_packages(exclude=['contrib', 'docs', 'tests']),
python_requires='>=3',
# Alternatively, if you want to distribute just a my_module.py, uncomment
# this:
# py_modules=["my_module"],

8
teknik/uploads.py

@ -1,20 +1,16 @@ @@ -1,20 +1,16 @@
# Copyright (c) 2017 by Uncled1023 <admin@teknik.io>
#
# License BSD 3-Clause
import_success = True
# Base Libraries
import base64
import json
# Local Libraries
from . import util
# Dependencies
try:
import requests
except ImportError as e:
print('Missing package(s) for %s: %s' % ('Teknik', e))
import_success = False
import requests
# Main Functions
def UploadFile(url, filePath, username, authToken):

5
teknik/util.py

@ -1,4 +1,7 @@ @@ -1,4 +1,7 @@
from urllib.parse import urljoin
try:
from urllib.parse import urljoin
except ImportError as e:
from urlparse import urljoin
defaultUrl = 'https://api.teknik.io/v1/'
defaultUsername = ''

Loading…
Cancel
Save