Research
Security News
Malicious npm Packages Inject SSH Backdoors via Typosquatted Libraries
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Keep your local python scripts installed and in sync with a databricks notebook. Shortens the feedback loop to develop projects using a hybrid enviroment
Databricks-Rocket (short db-rockets), keeps your local Python scripts installed and synchronized with a Databricks notebook. Every change on your local machine is automatically reflected in the notebook. This shortens the feedback loop for developing git-based projects and eliminates the need to set up a local development environment.
Install databricks-rocket
using pip:
pip install databricks-rocket
Ensure you've created a personal access token in Databricks (offical documentation). Afterward, set up the Databricks CLI by executing:
databricks configure --token
Alternatively, you can set the Databricks token and host in your environment variables:
export DATABRICKS_HOST="mydatabrickshost"
export DATABRICKS_TOKEN="mydatabrickstoken"
If your project isn't already a pip package, you'll need to convert it into one. Use dbrocket for this:
rocket setup
Will create a setup.py for you.
By default, databricks-rocket
syncs your project to DBFS automatically. This allows you to update your code and have
those changes reflected in your Databricks notebook without restarting the Python kernel. Simply execute:
rocket launch
You'll then receive the exact command to run in your notebook. Example:
stevenmi@MacBook db-rocket % rocket launch --watch=False
>> Watch activated. Uploaded your project to databricks. Install your project in your databricks notebook by running:
>> %pip install --upgrade pip
>> %pip install -r /dbfs/temp/stevenmi/db-rocket/requirements.txt
>> %pip install --no-deps -e /dbfs/temp/stevenmi/db-rocket
and following in a new Python cell:
>> %load_ext autoreload
>> %autoreload 2
Finally, add the content in you databricks notebook:
Upload all root level json files:
rocket launch --glob_path="*,json"
On top also upload all env files:
rocket launch --glob_path="[\"*.json\", \".env*\"]"
When specifying lists, be mindful about the formatting of the parameter string.
If you've disabled the watch feature, databricks-rocket
will only upload your project as a wheel to DBFS:
rocket launch --watch=False
Example:
stevenmi@MacBook db-rocket % rocket launch --watch=False
>> Watch is disabled. Building creating a python wheel from your project
>> Found setup.py. Building python library
>> Uploaded ./dist/databricks_rocket-2.0.0-py3-none-any.whl to dbfs:/temp/stevenmi/db-rocket/dist/databricks_rocket-2.0.0-py3-none-any.whl
>> Uploaded wheel to databricks. Install your library in your databricks notebook by running:
>> %pip install --upgrade pip
>> %pip install /dbfs/temp/stevenmi/db-rocket/databricks_rocket-2.0.0-py3-none-any.whl --force-reinstall
databricks-sdk
, is still in beta. We do not recommend using UC Volumes in production.Contributions are welcomed!
For security issues please contact security@getyourguide.com.
db-rocket is licensed under the Apache License, Version 2.0. See LICENSE for the full text.
FAQs
Keep your local python scripts installed and in sync with a databricks notebook. Shortens the feedback loop to develop projects using a hybrid enviroment
We found that databricks-rocket demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 4 open source maintainers 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
Security News
Socket’s threat research team has detected six malicious npm packages typosquatting popular libraries to insert SSH backdoors.
Security News
MITRE's 2024 CWE Top 25 highlights critical software vulnerabilities like XSS, SQL Injection, and CSRF, reflecting shifts due to a refined ranking methodology.
Security News
In this segment of the Risky Business podcast, Feross Aboukhadijeh and Patrick Gray discuss the challenges of tracking malware discovered in open source softare.