
Research
Malicious npm Packages Impersonate Flashbots SDKs, Targeting Ethereum Wallet Credentials
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Simple MongoDb dependency for nameko (microservices framework). Based on https://github.com/saiqi/nameko-mongodb
This is DependencyProvider for Nameko microservices framework which enables users to work with MongoDb.
First of all I should say that this package based on https://github.com/saiqi/nameko-mongodb . Thank you @saiqi :)
What has been changed:
The same as you guessing: pip install nameko-mongodb
There are some configuration options to use this package (required are in bold):
You can use the connection following way:
from nameko.rpc import rpc
import MongoDatabase from nameko_mongodb
class YourService(object):
name = 'your_service'
database = MongoDatabase()
@rpc
def find_item(self):
return self.database.your_collection.find_one()
Also this package can log all executions to logging
collection. If you want to use it:
from nameko.rpc import rpc
import MongoDatabase from nameko_mongodb
class YourService(object):
name = 'your_service'
database = MongoDatabase(result_backend=True)
@rpc
def find_item(self):
return self.database.your_collection.find_one()
Sometimes there can be useful to get possibility executing callbacks for DependencyProvider methods (i.e. migrating data when dependency initialized etc.). There are some callbacks:
on_before_setup
: (instance)on_after_setup
: (instance)on_before_stop
: (instance)on_after_stop
: (instance)on_before_worker_setup
: (instance, worker_ctx)on_after_worker_setup
: (instance, worker_ctx)on_before_worker_result
: (instance, worker_ctx, result, exc_info)on_after_worker_result
: (instance, worker_ctx, result, exc_info)How to use callbacks:
from nameko.rpc import rpc
import MongoDatabase from nameko_mongodb
class YourService(object):
name = 'your_service'
database = MongoDatabase(
on_before_setup=lambda x: print("Start setup DP"),
on_after_setup=lambda x: print("Stop setup DP"),
)
@rpc
def find_item(self):
return self.database.your_collection.find_one()
I'd be glad to see your pull requests
FAQs
Simple MongoDb dependency for nameko (microservices framework). Based on https://github.com/saiqi/nameko-mongodb
We found that nameko-mongodb demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Four npm packages disguised as cryptographic tools steal developer credentials and send them to attacker-controlled Telegram infrastructure.
Security News
Ruby maintainers from Bundler and rbenv teams are building rv to bring Python uv's speed and unified tooling approach to Ruby development.
Security News
Following last week’s supply chain attack, Nx published findings on the GitHub Actions exploit and moved npm publishing to Trusted Publishers.