Skip to content

Commit

Permalink
rename
Browse files Browse the repository at this point in the history
  • Loading branch information
ewdurbin committed Jul 7, 2014
1 parent 14d6c7c commit 30244fb
Show file tree
Hide file tree
Showing 13 changed files with 25 additions and 25 deletions.
20 changes: 10 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
clandestiny
clandestined
===========

rendezvous hashing implementation based on murmur3 hash
Expand All @@ -11,18 +11,18 @@ cluster of machines. consistent hashing and rendezvous hashing are methods of
performing this task, while minimizing data movement on cluster topology
changes.

clandestiny is a library for rendezvous hashing which has the goal of simple
clandestined is a library for rendezvous hashing which has the goal of simple
clients and ease of use.

Currently targetting for support:
- Python 2.5 through Python 3.4

[![Build Status](https://travis-ci.org/ewdurbin/clandestiny-python.svg?branch=master)](https://travis-ci.org/ewdurbin/clandestiny-python)
[![Build Status](https://travis-ci.org/ewdurbin/clandestined-python.svg?branch=master)](https://travis-ci.org/ewdurbin/clandestined-python)

## example usage

```python
>>> from clandestine import Cluster
>>> from clandestined import Cluster
>>>
>>> nodes = {
... '1': {'name': 'node1.example.com', 'zone': 'us-east-1a'},
Expand Down Expand Up @@ -50,8 +50,8 @@ invoke the `RendezvousHash` class directly, or use a `Cluster` with replicas
set to 1

```python
>>> from clandestine import Cluster
>>> from clandestine import RendezvousHash
>>> from clandestined import Cluster
>>> from clandestined import RendezvousHash
>>>
>>> nodes = {
... '1': {'name': 'node1.example.com'},
Expand Down Expand Up @@ -85,8 +85,8 @@ technique is by no means a way to fully mitigate a DoS attack using crafted
keys, it may make you sleep better at night.

```python
>>> from clandestine import Cluster
>>> from clandestine import RendezvousHash
>>> from clandestined import Cluster
>>> from clandestined import RendezvousHash
>>>
>>> nodes = {
... '1': {'name': 'node1.example.com'},
Expand Down Expand Up @@ -121,8 +121,8 @@ an integer.

```python
>>> import hashlib
>>> from clandestine import Cluster
>>> from clandestine import RendezvousHash
>>> from clandestined import Cluster
>>> from clandestined import RendezvousHash
>>>
>>> nodes = {
... '1': {'name': 'node1.example.com'},
Expand Down
3 changes: 0 additions & 3 deletions clandestine/__init__.py

This file was deleted.

3 changes: 3 additions & 0 deletions clandestined/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
from .clandestined import RendezvousHash
from .clandestined import Cluster
from .murmur3 import murmur3_x86_32
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import hashlib
import unittest

from clandestine import Cluster
from clandestine._murmur3 import murmur3_32
from clandestined import Cluster
from clandestined._murmur3 import murmur3_32

def my_hash_function(key):
return int(hashlib.md5(key).hexdigest(), 16)
Expand Down
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
import hashlib
import unittest

from clandestine import RendezvousHash
from clandestine._murmur3 import murmur3_32
from clandestined import RendezvousHash
from clandestined._murmur3 import murmur3_32

def my_hash_function(key):
return int(hashlib.md5(key).hexdigest(), 16)
Expand Down
6 changes: 3 additions & 3 deletions ext/_murmur3.c
Original file line number Diff line number Diff line change
Expand Up @@ -61,10 +61,10 @@ static char module_docstring[] =
static char murmur3_32_docstring[] =
"Calculate the murmur3_32 hash for a given string.";

static PyObject *clandestine_murmur3_32(PyObject *self, PyObject *args);
static PyObject *clandestined_murmur3_32(PyObject *self, PyObject *args);

static PyMethodDef module_methods[] = {
{"murmur3_32", clandestine_murmur3_32, METH_VARARGS, murmur3_32_docstring},
{"murmur3_32", clandestined_murmur3_32, METH_VARARGS, murmur3_32_docstring},
{NULL, NULL, 0, NULL}
};

Expand Down Expand Up @@ -133,7 +133,7 @@ PyMODINIT_FUNC init_murmur3(void)
#endif
}

static PyObject *clandestine_murmur3_32(PyObject *self, PyObject *args)
static PyObject *clandestined_murmur3_32(PyObject *self, PyObject *args)
{
const char *key;
uint32_t len;
Expand Down
8 changes: 4 additions & 4 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@
test_requirements = []

setup(
name='clandestiny',
name='clandestined',
version='1.0.0a',
author="Ernest W. Durbin III",
author_email='[email protected]',
description='rendezvous hashing implementation based on murmur3 hash',
url='https://github.com/ewdurbin/clandestiny',
packages=['clandestine'],
ext_modules=[Extension('clandestine._murmur3', ['ext/_murmur3.c'],
url='https://github.com/ewdurbin/clandestined-python',
packages=['clandestined'],
ext_modules=[Extension('clandestined._murmur3', ['ext/_murmur3.c'],
extra_compile_args=extra_compile_args)],
scripts=[],
test_suite='tests',
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ setenv =
PYTHONDONTWRITEBYTECODE = 1

commands =
python clandestine/test/test_clandestine.py
python clandestined/test/test_clandestined.py

0 comments on commit 30244fb

Please sign in to comment.