Code Monkey home page Code Monkey logo

lagoon-python's Introduction

lagoon-python

PyPI version

lagoon-python is the official Python client for lagoon, aAn inmemory and highly concurrent bloom filter service based on json-rpc.

Installation

lagoon-python supports:

  • Python (3.5, 3.6, 3.7, 3.8)

Install from Pypi

pip install lagoon-python

Usage

# Create a new client
import lagoon
client = lagoon.connect('YOUR_LAGOON_HOSTNAME', 'LAGOON_SERVICE_PORT')

# Create a collection
collection1 = client.create_collection("collection1")

# create a key in the collection
client.set_key("collection1", "key1")

# check if a key exist in the collection
client.has_key("collection1", "key1")

# delete collection
client.delete_collection("collection1")

Contributing

First, make sure you can run the test suite. Tests are run via py.test

Install test requirements

pip install .[test]

py.test
# with coverage
py.test --cov lagoon --cov-report html
# with setuppy
python setup.py test
# lint with setup.py
python setup.py lint 
# check lint
python setup.py lint --check

Install black and flake8

pip install .[ci]

Install git hooks to avoid pushing invalid code (git commit will run black and flake8)

Releasing a new version

In order to release new version you need to be a maintainer on Pypi.

  • Update CHANGELOG
  • Update the version on setup.py
  • Commit and push to Github
  • Create a new tag for the version (eg. v1.1.0)
  • Create a new dist with python python setup.py sdist
  • Upload the new distributable with twine twine upload dist/lagoon-python-VERSION-NAME.tar.gz

If unsure you can also test using the Pypi test servers twine upload --repository-url https://test.pypi.org/legacy/ dist/lagoon-python-VERSION-NAME.tar.gz

lagoon-python's People

Contributors

sourcepirate avatar rajaravi1 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.