
Security News
npm Adopts OIDC for Trusted Publishing in CI/CD Workflows
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
A Python package providing helper functions to programmatically import Jupyter notebook content into Cloud platforms via REST APIs.
A Python package providing helper functions to programmatically import Jupyter notebook content into Azure Databricks, Azure Synapse and Microsoft Fabric workspaces via REST APIs.
DefaultAzureCredential
for Synapse and Azure AD ManagedIdentityCredential
for Fabric.Install via PyPI once published:
pip install Code2cloudNB
import base64
from Code2cloudNB import import_code_to_databricks
# Your Databricks workspace info
host = "https://<databricks-instance>"
token = "<your-databricks-pat>"
domain_name = "<your-domain-or-username>"
target_path = "target/folder/path"
filename = "my_notebook"
# Load your notebook JSON file content and encode to base64
with open("notebook.ipynb", "rb") as f:
notebook_content = f.read()
encoded_string = base64.b64encode(notebook_content).decode()
response = import_code_to_databricks(host, token, domain_name, target_path, filename, encoded_string)
print(response)
from Code2cloudNB import import_code_to_synapse
import json
wName = "<your-synapse-workspace-name>"
target_path = "target_folder"
filename = "my_notebook"
pool_name = "<your-big-data-pool-name>"
api_version = "2021-06-01" # example API version
# Load notebook JSON content as Python dict
with open("notebook.ipynb", "r") as f:
notebook_json = json.load(f)
response = import_code_to_synapse(wName, target_path, filename, pool_name, notebook_json, api_version)
print(response)
import base64
from Code2cloudNB import import_code_to_fabric
wID = "<your-fabric-workspace-id>"
target_path = "<target-folder>"
filename = "my_notebook"
api_version = "v1" # example API version
# Load your notebook JSON file content and encode to base64
with open("notebook.ipynb", "rb") as f:
notebook_content = f.read()
encoded_string = base64.b64encode(notebook_content).decode('utf-8')
response = import_code_to_fabric(wID, target_path, filename, api_version, encoded_string)
print(response)
For Databricks import:
For Synapse import:
azure-identity
Python package installed for DefaultAzureCredential
support.For Fabric import:
active(running)
Azure Fabric Capacity, linked to the Fabric workspace.azure-identity
Python package installed for ManagedIdentityCredential
support.Azure Security Group
.VM's object/principal ID (Managed Identity)
as the member
of the group and keep yourself as the owner
.manage workspaces
tab, click add people + group
, add your Security Group and grant it the Contributor
role.pip install azure-identity requests
Each of the functions return dictionaries including HTTP status codes, results and error messages if any operation fails. Use these to troubleshoot or log issues.
This project is licensed under the MIT License - see the [LICENSE] (LICENSE) file for details.
Feel free to open issues or submit pull requests to improve the package.
Antick Mazumder — antick.majumder@gmail.com
FAQs
A Python package providing helper functions to programmatically import Jupyter notebook content into Cloud platforms via REST APIs.
We found that Code2cloudNB 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
npm now supports Trusted Publishing with OIDC, enabling secure package publishing directly from CI/CD workflows without relying on long-lived tokens.
Research
/Security News
A RubyGems malware campaign used 60 malicious packages posing as automation tools to steal credentials from social media and marketing tool users.
Security News
The CNA Scorecard ranks CVE issuers by data completeness, revealing major gaps in patch info and software identifiers across thousands of vulnerabilities.