Skip to content

Commit

Permalink
initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
red-crown committed Mar 7, 2016
0 parents commit 507cc35
Show file tree
Hide file tree
Showing 17 changed files with 1,091 additions and 0 deletions.
120 changes: 120 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,120 @@
### JetBrains template
# Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio

*.iml

## Directory-based project format:
.idea/
# if you remove the above rule, at least ignore the following:

# User-specific stuff:
#.idea/workspace.xml
#.idea/tasks.xml
#.idea/dictionaries

# Sensitive or high-churn files:
#.idea/dataSources.ids
#.idea/dataSources.xml
#.idea/sqlDataSources.xml
#.idea/dynamic.xml
#.idea/uiDesigner.xml

# Gradle:
#.idea/gradle.xml
#.idea/libraries

# Mongo Explorer plugin:
#.idea/mongoSettings.xml

## File-based project format:
*.ipr
*.iws

## Plugin-specific files:

# IntelliJ
/out/

# mpeltonen/sbt-idea plugin
.idea_modules/

# JIRA plugin
atlassian-ide-plugin.xml

# Crashlytics plugin (for Android Studio and IntelliJ)
com_crashlytics_export_strings.xml
crashlytics.properties
crashlytics-build.properties

### Python template
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class

# C extensions
*.so

# Distribution / packaging
.Python
env/
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
*.egg-info/
.installed.cfg
*.egg

# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec

# Installer logs
pip-log.txt
pip-delete-this-directory.txt

# Unit test / coverage reports
htmlcov/
.tox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*,cover

# Translations
*.mo
*.pot

# Django stuff:
*.log

# Sphinx documentation
docs/_build/

# PyBuilder
target/

### Vim template
[._]*.s[a-w][a-z]
[._]s[a-w][a-z]
*.un~
Session.vim
.netrwhist
*~

### Dotenv
.env

# Created by .ignore support plugin (hsz.mobi)
6 changes: 6 additions & 0 deletions AUTHORS.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
*rcquerybuilder* is written and maintained by Matthew Strickland

Contributors
````````````

- Matthew Strickland <[email protected]> `@red-crown <https://github.com/red-crown>`_, Creator.
9 changes: 9 additions & 0 deletions HISTORY.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
.. :changelog:
Release History
---------------

0.1.0 (???)
+++++++++++

* Initialization
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
The MIT License (MIT)

Copyright (c) <Matthew Strickland>

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
5 changes: 5 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
init:
pip install -r requirements.txt

test:
nosetests tests
40 changes: 40 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
RC QueryBuilder: Fluent QueryBuilder for MongoDB
================================================

The **rcquerybuilder** package provides a fluent api wrapper around pymongo queries.

This allows you to write and execute mongodb queries like this:

.. code-block:: python
>>> from rcquerybuilder.builder import Builder
>>> qb = Builder(collection=None)
>>> qb.field('name').equals('foobar') \
... .field('fizz').ne(None) \
... .get_query_list()
{'name': 'foobar', 'fizz': {'$ne': None}}
Installation
------------

To install rcquerybuilder, simply:

.. code-block:: bash
$ pip install rcquerybuilder
Documentation
-------------

Documentation is available at https://rcquerybuilder.readthedocs.org.

How to Contribute
-----------------

#. Fork `the repository`_ to start making your changes on the **master** branch (or branch off of it).
#. Send a pull request and make sure to add yourself to AUTHORS_.

.. _`the repository`: http://github.com/red-crown/mongo-querybuilder
.. _AUTHORS: https://github.com/red-crown/requests/blob/master/AUTHORS.rst


Empty file added docs/index.rst
Empty file.
11 changes: 11 additions & 0 deletions rcquerybuilder/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
from rcquerybuilder.builder import Builder
from rcquerybuilder.builder import Expr
from rcquerybuilder.pipeline import PipelineExpr
from rcquerybuilder.pipeline import PipelineStage

__all__ = [
'Builder',
'Expr',
'PipelineExpr',
'PipelineStage'
]
Loading

0 comments on commit 507cc35

Please sign in to comment.