Welcome to robby’s documentation!¶
Contents:
Robby¶
Probabilities as a Service

Available as a docker container with docker pull sdehaan/robby
.
The docker container allow the for the following environment variables:
- REDIS_HOST, defaults to
127.0.0.1
- REDIS_PORT, defaults to
6379
- REDIS_DB, defaults to
1
- ROBBY_PORT, defaults to
8080
- ROBBY_PREFIX, the prefix for Redis keys, defaults to
robby
- ROBBY_STEMMING_LANGUAGE, defaults to
english
- ROBBY_TOKENIZER, the python callable to use for tokenizing. Defaults to
robby.utils.english_tokenizer
,robby.utils.dumb_tokenizer
is also available.
Or pip install robby
and run directly:
robby \
--redis-uri redis://127.0.0.1:6379/1 \
--interface 0.0.0.0 \
--port 8080 \
--prefix robby \
--stemming \
--stemming-language=english \
--tokenizer=robby.utils.english_tokenizer \
--debug
API¶
To train it:
$ curl -d 'training sample' http://localhost:8080/train/bucket-name/category
To untrain it:
$ curl -d 'training sample' http://localhost:8080/untrain/bucket-name/category
To train it in batches:
$ curl -d '[{"category": "category", "content": "training sample"}]' http://localhost:8080/batch/train/bucket-name
To classify:
$ curl -d 'sample message' http://localhost:8080/classify/bucket-name
{
"category": "category"
}
To get scoring:
$ curl -d 'sample message' http://localhost:8080/score/bucket-name
{
"category": 0.01
}
To get clear the db:
$ curl -X DELETE http://localhost:8080/flush/bucket-name
Installation¶
At the command line:
$ easy_install robby
Or, if you have virtualenvwrapper installed:
$ mkvirtualenv robby
$ pip install robby
Contributing¶
Contributions are welcome, and they are greatly appreciated! Every little bit helps, and credit will always be given.
You can contribute in many ways:
Types of Contributions¶
Report Bugs¶
Report bugs at https://github.com/smn/robby/issues.
If you are reporting a bug, please include:
- Your operating system name and version.
- Any details about your local setup that might be helpful in troubleshooting.
- Detailed steps to reproduce the bug.
Fix Bugs¶
Look through the GitHub issues for bugs. Anything tagged with “bug” is open to whoever wants to implement it.
Implement Features¶
Look through the GitHub issues for features. Anything tagged with “feature” is open to whoever wants to implement it.
Write Documentation¶
robby could always use more documentation, whether as part of the official robby docs, in docstrings, or even on the web in blog posts, articles, and such.
Submit Feedback¶
The best way to send feedback is to file an issue at https://github.com/smn/robby/issues.
If you are proposing a feature:
- Explain in detail how it would work.
- Keep the scope as narrow as possible, to make it easier to implement.
- Remember that this is a volunteer-driven project, and that contributions are welcome :)
Get Started!¶
Ready to contribute? Here’s how to set up robby for local development.
Fork the robby repo on GitHub.
Clone your fork locally:
$ git clone git@github.com:your_name_here/robby.git
Install your local copy into a virtualenv. Assuming you have virtualenvwrapper installed, this is how you set up your fork for local development:
$ mkvirtualenv robby $ cd robby/ $ python setup.py develop
Create a branch for local development:
$ git checkout -b name-of-your-bugfix-or-feature
Now you can make your changes locally.
When you’re done making changes, check that your changes pass flake8 and the tests, including testing other Python versions with tox:
$ flake8 robby tests $ python setup.py test $ tox
To get flake8 and tox, just pip install them into your virtualenv.
Commit your changes and push your branch to GitHub:
$ git add . $ git commit -m "Your detailed description of your changes." $ git push origin name-of-your-bugfix-or-feature
Submit a pull request through the GitHub website.
Pull Request Guidelines¶
Before you submit a pull request, check that it meets these guidelines:
- The pull request should include tests.
- If the pull request adds functionality, the docs should be updated. Put your new functionality into a function with a docstring, and add the feature to the list in README.rst.
- The pull request should work for Python 2.6, 2.7, 3.3, and 3.4, and for PyPy. Check https://travis-ci.org/smn/robby/pull_requests and make sure that the tests pass for all supported Python versions.
Credits¶
Development Lead¶
- Simon de Haan <simon@praekeltfoundation.org>
Contributors¶
None yet. Why not be the first?
History¶
0.1.0 (2015-01-11)¶
- First release on PyPI.