Skip to content

Commit

Permalink
Enhance the project.
Browse files Browse the repository at this point in the history
  • Loading branch information
hengfengli committed Sep 20, 2018
1 parent 2d00c22 commit aa5a5e3
Show file tree
Hide file tree
Showing 14 changed files with 200 additions and 328 deletions.
13 changes: 13 additions & 0 deletions .bumpversion.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[bumpversion]
commit = True
tag = False
current_version = 0.1.0
parse = (?P<major>\d+)\.(?P<minor>\d+)\.(?P<patch>\d+)(\-(?P<release>[a-z]+))?
serialize =
{major}.{minor}.{patch}-{release}
{major}.{minor}.{patch}

[bumpversion:file:kcpy/__init__.py]

[bumpversion:file:VERSION]

2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -115,3 +115,5 @@ erl_crash.dump
*.db
Documentation/
.cache/

.pytest_cache/
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2017 Hengfeng Li
Copyright (c) 2018 Hengfeng Li

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
30 changes: 30 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
PYTHON ?= python
GIT ?= git

clean: clean-pyc clean-build

clean-dist: clean clean-git-force

clean-build:
rm -rf build/ dist/ .eggs/ *.egg-info/ .tox/ .coverage cover/

clean-pyc:
-find . -type f -a \( -name "*.pyc" -o -name "*$$py.class" \) | xargs rm
-find . -type d -name "__pycache__" | xargs rm -r

clean-git:
$(GIT) clean -xdn

clean-git-force:
$(GIT) clean -xdf

test:
pytest tests/tests.py

build:
$(PYTHON) setup.py sdist bdist_wheel

dist: clean-dist build

lint:
flake8
9 changes: 3 additions & 6 deletions Pipfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,14 @@
[[source]]

url = "https://pypi.python.org/simple"
verify_ssl = true
name = "pypi"


[packages]

"boto3" = "*"


[dev-packages]

moto = "*"
pytest = "*"
faker = "*"
bumpversion = "*"
"flake8" = "*"
moto = "*"
410 changes: 91 additions & 319 deletions Pipfile.lock

Large diffs are not rendered by default.

10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,19 @@

A kinesis consumer is purely written in python.

# Features
## Features

* Read records from a stream with multiple shards

# Todo
## Todo

* Open a consumer when adding a new shard
* Close a consumer when shutting down an existing shard
* Save checkpoint for each shard
* Allow kcpy to run on multiple machines

## Changelog

### 0.1.0

* First version of kcpy.
1 change: 1 addition & 0 deletions VERSION
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
0.1.0
6 changes: 6 additions & 0 deletions kcpy/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
__title__ = 'kcpy'
__version__ = '0.1.0'
__author__ = 'Hengfeng Li'
__license__ = 'MIT 2018'

from .core import *
File renamed without changes.
8 changes: 8 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[bdist_wheel]
universal = 1

[flake8]
ignore = E226,E302,E41,F401,E402,F403
max-line-length = 120
exclude = tests/*,.eggs/*
max-complexity = 10
37 changes: 37 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/usr/bin/env python

import kcpy

from setuptools import setup, find_packages

setup(
name='kcpy',
version=kcpy.__version__,
description='A kinesis consumer is purely written in python.',
author='Hengfeng Li',
author_email='[email protected]',
license='MIT License',

packages=find_packages(),
package_dir={'kcpy': 'kcpy'},
include_package_data=True,
python_requires='>=3.5.0',
keywords=[
'kinesis',
'consumer',
'stream',
'processing',
'queue',
],
scripts=[],
install_requires=[
'boto3',
],
dependency_links=[],
tests_require=[
'pytest',
'moto',
'faker',
],
zip_safe=False,
)
Empty file added tests/__init__.py
Empty file.
File renamed without changes.

0 comments on commit aa5a5e3

Please sign in to comment.