-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added MongoDB StorageInterface implementation #27
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this PR.
def __init__(self, connection_string="mongodb://127.0.0.1:27017/cscapi"): | ||
try: | ||
connect( | ||
host="mongodb://127.0.0.1:27017/cscapi", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here, I will modify with host=connection_string.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Thanks for this !
After merge, I will just try to add some github action tests for this mongo implementation and probably will modify slightly unit test to use some env connection_string.
Then, I will publish a new release.
Added implementation of MongoDB storage interface and its tests.
The new interface is not used by default but has an optional dependency that can be installed with
pip install cscapi[mongodb]
.The
get_signals
method has been hard to implement with MongoDB, so if you see any improvements that can be done I will gladly accept them :)