Skip to content

Commit

Permalink
Release 0.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
NicolasLM committed Dec 11, 2017
1 parent b6fd28c commit aeccf10
Show file tree
Hide file tree
Showing 9 changed files with 112 additions and 37 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
.pyc
__pycache__
.cache
build
dist
bplustree.egg-info
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ python:
- "3.6"

install:
- pip install -r requirements.txt
- pip install -e .[tests]

script:
- pytest -v --cov=bplustree tests/
Expand Down
10 changes: 10 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
publish:
pip install -U pip setuptools wheel twine
python setup.py sdist
python setup.py bdist_wheel
twine upload dist/*
rm -fr build dist bplustree.egg-info

clean:
rm -fr build dist bplustree.egg-info

22 changes: 0 additions & 22 deletions README.md

This file was deleted.

38 changes: 38 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
Bplustree
=========

.. image:: https://travis-ci.org/NicolasLM/bplustree.svg?branch=master
:target: https://travis-ci.org/NicolasLM/bplustree
.. image:: https://coveralls.io/repos/github/NicolasLM/bplustree/badge.svg?branch=master
:target: https://coveralls.io/github/NicolasLM/bplustree?branch=master

An on-disk B+tree for Python 3.

Quickstart
----------

Install Bplustree with pip::

pip install bplustree

Create a B+tree index stored on a file and use it with:

.. code:: python
>>> from bplustree import BPlusTree
>>> tree = BPlusTree(filename='/tmp/bplustree.db', order=50)
>>> tree.insert(1, b'foo')
>>> tree.insert(2, b'bar')
>>> tree.get(1)
b'foo'
>>> for i in tree:
... print(i)
...
1
2
>>> tree.close()
License
-------

MIT
3 changes: 3 additions & 0 deletions bplustree/__init__.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,5 @@
from .tree import BPlusTree
from .memory import Fsync
from .const import VERSION

__version__ = VERSION
2 changes: 2 additions & 0 deletions bplustree/const.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
from collections import namedtuple

VERSION = '0.0.1'

# Endianess for storing numbers
ENDIAN = 'little'

Expand Down
14 changes: 0 additions & 14 deletions requirements.txt

This file was deleted.

55 changes: 55 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
from setuptools import setup, find_packages
from codecs import open
from os import path

here = path.abspath(path.dirname(__file__))

with open(path.join(here, 'README.rst'), encoding='utf-8') as f:
long_description = f.read()

with open(path.join(here, 'LICENSE'), encoding='utf-8') as f:
long_description += f.read()

with open(path.join(here, 'bplustree', 'const.py'), encoding='utf-8') as fp:
version = dict()
exec(fp.read(), version)
version = version['VERSION']

setup(
name='bplustree',
version=version,
description='On-disk B+tree for Python 3',
long_description=long_description,
url='https://github.com/NicolasLM/bplustree',
author='Nicolas Le Manchet',
author_email='nicolas@lemanchet.fr',
license='MIT',
# See https://pypi.python.org/pypi?%3Aaction=list_classifiers
classifiers=[
'Development Status :: 4 - Beta',
'Intended Audience :: Developers',
'Topic :: Software Development :: Libraries',
'Topic :: Database',
'License :: OSI Approved :: MIT License',
'Natural Language :: English',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3 :: Only',
'Programming Language :: Python :: 3.5',
'Programming Language :: Python :: 3.6',
],
keywords='bplustree B+tree Btree database index',

packages=find_packages(include=('bplustree', 'bplustree.*')),
install_requires=[
'cachetools'
],

extras_require={
'tests': [
'pytest',
'pytest-cov',
'python-coveralls',
'pep8'
],
},
)

0 comments on commit aeccf10

Please sign in to comment.