
Security News
vlt Launches "reproduce": A New Tool Challenging the Limits of Package Provenance
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
You use Modular SDK to create, configure, and manage common entities, such as:
python3 -m pip install --upgrade build
pyptoject.toml
is located: python3 -m build
dist/
modular_sdk-{version}.tar.gz
modular_sdk-{version}-py3-none-any.whl
pip install modular-sdk
To use Modular SDK, you must import, configure and indicate which service or services you're going to use:
from modular_sdk.modular import Modular
modular_sdk = Modular()
parent_service = modular_sdk.parent_service()
tenant_service = modular_sdk.tenant_service()
For now, Modular provides 3 ways of DB access. Depends on the way of database connection, different sets of env variables must be set:
modular_service_mode
: docker
,modular_mongo_user
: $MONGO_USER
,modular_mongo_password
: $MONGO_PASSWORD
,modular_mongo_url
: $MONGO_URL
,modular_mongo_db_name
: $MONGO_DB_NAME
,modular_service_mode
: saas
# Optionalmodular_assume_role_arn
: $ASSUME_ROLE_ARN
modular_service_mode
: saas
# OptionalAlternatively, you can pass these parameters (fully or partially) on initialization:
from modular_sdk.modular import Modular
modular_sdk = Modular(modular_service_mode='docker',
modular_mongo_user='MONGO_USER',
modular_mongo_password='MONGO_PASSWORD',
modular_mongo_url='MONGO_URL',
modular_mongo_db_name='DB_NAME')
# initialize some services
application_service = modular_sdk.application_service()
parent_service = modular_sdk.parent_service()
Example 1: List Maestro Customers
from modular_sdk.modular import Modular
# initializing application service
customer_service = Modular().customer_service()
# listing available customers
customers = customer_service.list()
# printing customer names
for customer in customers:
print(customer.name)
Example 2: Update Maestro Application
from modular_sdk.modular import Modular
# initializing application service
application_service = Modular().application_service()
# extracting application by id
application = application_service.get_application_by_id(
application_id="$APP_ID")
# updating application description
description_to_set = 'Updated application description'
application_service.update(application=application,
description=description_to_set)
# saving updated application
application_service.save(application=application)
Example 3: Delete Maestro Parent
from modular_sdk.modular import Modular
# initializing parent service
parent_service = Modular().parent_service()
# extracting parent by id
parent = parent_service.get_parent_by_id(parent_id="$PARENT_ID")
# deleting parent
parent_service.mark_deleted(parent=parent)
FAQs
Data level integration for services built atop of Modular Framework
We found that modular-sdk 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.
Security News
vlt's new "reproduce" tool verifies npm packages against their source code, outperforming traditional provenance adoption in the JavaScript ecosystem.
Research
Security News
Socket researchers uncovered a malicious PyPI package exploiting Deezer’s API to enable coordinated music piracy through API abuse and C2 server control.
Research
The Socket Research Team discovered a malicious npm package, '@ton-wallet/create', stealing cryptocurrency wallet keys from developers and users in the TON ecosystem.