From cc02f6602fb4e2fc9386340eac825d4e82695ea2 Mon Sep 17 00:00:00 2001 From: Matin Tamizi Date: Thu, 19 Mar 2020 05:03:28 -0600 Subject: [PATCH] initial commit --- .gitignore | 120 +++++++++++++++++++++++++++++ Makefile | 41 ++++++++++ README.md | 1 + cuenca/__init__.py | 0 cuenca/client.py | 0 cuenca/py.typed | 0 cuenca/resources/transferencias.py | 0 cuenca/version.py | 1 + setup.cfg | 15 ++++ setup.py | 46 +++++++++++ 10 files changed, 224 insertions(+) create mode 100644 .gitignore create mode 100644 Makefile create mode 100644 README.md create mode 100644 cuenca/__init__.py create mode 100644 cuenca/client.py create mode 100644 cuenca/py.typed create mode 100644 cuenca/resources/transferencias.py create mode 100644 cuenca/version.py create mode 100644 setup.cfg create mode 100644 setup.py diff --git a/.gitignore b/.gitignore new file mode 100644 index 00000000..c68ee63a --- /dev/null +++ b/.gitignore @@ -0,0 +1,120 @@ +# Byte-compiled / optimized / DLL files +__pycache__/ +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +*.egg-info/ +.installed.cfg +*.egg +MANIFEST + +# PyInstaller +# Usually these files are written by a python script from a template +# before PyInstaller builds the exe, so as to inject date/other infos into it. +*.manifest +*.spec + +# Installer logs +pip-log.txt +pip-delete-this-directory.txt + +# Unit test / coverage reports +htmlcov/ +.tox/ +.coverage +.coverage.* +.cache +nosetests.xml +coverage.xml +*.cover +.hypothesis/ +.pytest_cache/ + +# Translations +*.mo +*.pot + +# Django stuff: +*.log +local_settings.py +db.sqlite3 + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# pyenv +.python-version + +# celery beat schedule file +celerybeat-schedule + +# SageMath parsed files +*.sage.py + +# Environments +.env +.venv +env/ +venv/ +ENV/ +env.bak/ +venv.bak/ + +# Spyder project settings +.spyderproject +.spyproject + +# Rope project settings +.ropeproject + +# mkdocs documentation +/site + +# mypy +.mypy_cache/ + +# pycharm +.idea/ + +# visual studio code +.vscode/ + +# environment variables +.env + +# envrc +.envrc + +# others +.DS_Store + diff --git a/Makefile b/Makefile new file mode 100644 index 00000000..46c412e9 --- /dev/null +++ b/Makefile @@ -0,0 +1,41 @@ +SHELL := bash +PATH := ./venv/bin:${PATH} +PYTHON=python3.7 +PROJECT=cuenca +isort = isort -rc -ac $(PROJECT) tests setup.py +black = black -S -l 79 --target-version py37 $(PROJECT) tests setup.py + + +all: test + +venv: + $(PYTHON) -m venv --prompt $(PROJECT) venv + pip install -qU pip + +install-test: + pip install -q .[test] + +test: clean install-test lint + python setup.py test + +format: + $(isort) + $(black) + +lint: + flake8 $(PROJECT) tests setup.py + $(isort) --check-only + $(black) --check + +clean: + find . -name '*.pyc' -exec rm -f {} + + find . -name '*.pyo' -exec rm -f {} + + find . -name '*~' -exec rm -f {} + + rm -rf build dist $(PROJECT).egg-info + +release: clean + python setup.py sdist bdist_wheel + twine upload dist/* + + +.PHONY: all install-test test format lint clean release diff --git a/README.md b/README.md new file mode 100644 index 00000000..0ab8ba4f --- /dev/null +++ b/README.md @@ -0,0 +1 @@ +cuenca: python client library diff --git a/cuenca/__init__.py b/cuenca/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/cuenca/client.py b/cuenca/client.py new file mode 100644 index 00000000..e69de29b diff --git a/cuenca/py.typed b/cuenca/py.typed new file mode 100644 index 00000000..e69de29b diff --git a/cuenca/resources/transferencias.py b/cuenca/resources/transferencias.py new file mode 100644 index 00000000..e69de29b diff --git a/cuenca/version.py b/cuenca/version.py new file mode 100644 index 00000000..499a02fc --- /dev/null +++ b/cuenca/version.py @@ -0,0 +1 @@ +__version__ = '0.0.1dev0' diff --git a/setup.cfg b/setup.cfg new file mode 100644 index 00000000..b1ce8cb7 --- /dev/null +++ b/setup.cfg @@ -0,0 +1,15 @@ +[aliases] +test=pytest + +[tool:pytest] +addopts = -p no:warnings -v --cov=cuenca + +[flake8] +inline-quotes = ' +multiline-quotes = """ + +[isort] +multi_line_output=3 +include_trailing_comma=True +force_grid_wrap=0 +combine_as_imports=True diff --git a/setup.py b/setup.py new file mode 100644 index 00000000..d5a75fcb --- /dev/null +++ b/setup.py @@ -0,0 +1,46 @@ +from importlib.machinery import SourceFileLoader + +from setuptools import find_packages, setup + +version = SourceFileLoader('version', 'cuenca/version.py').load_module() + +test_requires = [ + 'pytest', + 'pytest-vcr', + 'pytest-cov', + 'black', + 'isort[pipfile]', + 'flake8', +] + +with open('README.md', 'r') as f: + long_description = f.read() + + +setup( + name='cuenca', + version=version.__version__, + author='Cuenca', + author_email='dev@cuenca.com', + description='Cuenca API Client', + long_description=long_description, + long_description_content_type='text/markdown', + url='https://github.com/cuenca-mx/cuenca-python', + packages=find_packages(), + python_requires='>=3.6', + install_requires=[ + 'requests>=2.21.0,<2.22.0', + 'iso8601>=0.1.12,<0.2.0', + 'dataclasses>=0.6;python_version<"3.7"', + ], + setup_requires=['pytest-runner'], + tests_require=test_requires, + extras_require=dict(test=test_requires), + classifiers=[ + 'Programming Language :: Python :: 3', + 'Programming Language :: Python :: 3.6', + 'Programming Language :: Python :: 3.7', + 'License :: OSI Approved :: MIT License', + 'Operating System :: OS Independent', + ], +)