Skip to main content

databridge

The databridge package streamlines the management of common datasets across diverse projects. It facilitates the setup of paths, file names, and Python commands to access centralized files efficiently.

Why Use databridge?

Managing common datasets across multiple projects often involves repetitive tasks such as saving files, configuring paths, and importing libraries. The databridge package aims to simplify this process by offering a centralized data bucket.

Instead of manually saving files and configuring paths for each project, databridge allows you to create a config.json file. This file guides Python on where to locate common datasets locally, reducing redundancy and enhancing efficiency.

Example 1 - Without databridge

# Import geopandas package
import geopandas as gpd

# Import data
texas_boundaries = gpd.read_file("myproject_data_folder/Texas_boundaries.shp")

This method is straightforward but can become repetitive when dealing with multiple projects.

Example 2 - with databrigde

# Import databridge package
from databridge.databridge import data_bridge as db

# List all available datasets
db.list_datasets()

# Load dataset
texas_boundaries = db.load_dataset("local", "texas_boundaries")

Although Example 2 has the same number of line of code as Example 1, it significantly reduces redundancy. When dealing with multiple projects, you no longer need to save the file multiple times or manually set different paths.

Explore the power of databridge to enhance your workflow and centralize your datasets effortlessly.

How to configure databridge?

To configure databridge, you need to create a config.json file in the same location where the databridge package is installed. The config.json file should contain the following structure:

{
  "local": {
    "dataset_name": {
        "path": "absolute path to dataset file",
        "file": "file name including extension",
        "function": "function to load the dataset (e.g., gpd.read_file)"
    },
    "texas_boundaries": {
        "path": "C:/Users/username/Documents/myproject_data_folder",
        "file": "Texas_boundaries.shp",
        "function": "gpd.read_file"
  }
}

The package has a built-in method to create the config.json file.

# Import databridge package
from databridge.databridge import config_updater as cfu

# Update config.json file
cfu.update_config(
    environment="local",
    dataset_name="texas_boundaries",
    path="C:/Users/username/Documents/myproject_data_folder",
    file="Texas_boundaries.shp",
    function="gpd.read_file"
    )

# Save the updated config.json file
cfu.save_config()

The config.json file is now updated with the new dataset information.

How to use databridge?

To use databridge, you need to install the package and import the DataBridge class.

# Import databridge package
from databridge.databridge import data_btidge as db

# List all available datasets
db.list_datasets()

# Load dataset
df = db.load_dataset("local", "texas_boundaries")

Metadata

Release files for databridge 0.2.6

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for databridge 0.2.6
File Size Uploaded Provenance Actions
databridge-0.2.6.tar.gz 5.1 kB Without provenance Details for databridge-0.2.6.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for databridge 0.2.6
File Interpreter ABI Platform Actions
databridge-0.2.6-py3-none-any.whl Python 3 none any Details for databridge-0.2.6-py3-none-any.whl

Total release size: 10.9 kB

Release files / databridge-0.2.6.tar.gz

Download URL databridge-0.2.6.tar.gz
Size 5.1 kB
Tags Source
SHA-256 checksum
How to use checksums
acd8108ef09aab05fa1e5321ef6a9f0b9025131263d33304d1aa1ac2a12f5f45
BLAKE2b-256 checksum
How to use checksums
0989a4c66b280d8d4866b2c7a86cebe2a7e9a085c430269170047e0975494215
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.11.9

Release files / databridge-0.2.6-py3-none-any.whl

Download URL databridge-0.2.6-py3-none-any.whl
Size 5.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
c16e62d461d976a641e3f409d88ea1d9b032923622d67ee36b1d9404fa2618a0
BLAKE2b-256 checksum
How to use checksums
b30f26c1442672dfc0cc8b4bcb38ec350d2e86c10bbc6f5e84163c0cb1d16f42
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.0 CPython/3.11.9

Security for databridge 0.2.6

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.2.6 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page