Skip to main content

Fuso is a tool for merging data structures in Python. It provides a simple and intuitive API for merging dictionaries, lists, and other data structures.

Project description

Fuso

uv Ruff License: MIT Python Version PyPI Version Read the Docs

fuso comes from the Italian word fusione, which translates to fusion. This is exactly what this library does; it creates a fusion between two dictionaries.

The goal of this library is to offer a customizable way of deeply merging dictionaries. In its simplest form, fuso offers an experience like other well-established dictionary merging libraries such as deepmerge, mergedeep.

However, where this library differs is that it allows the user to specify custom merge_functions that should be applied for specific dot paths.

For example, you may want to concatenate lists found at the dot path settings.plugins, but for other lists, you may want to replace them entirely. With fuso, this is possible.

Installation

You can install fuso via pip:

pip install fuso

Usage

Here's a basic example of how to use fuso to merge two dictionaries:

from fuso import merge

dict1 = {
    "settings": {
        "theme": "dark",
        "plugins": ["plugin1", "plugin2"]
    }
}
dict2 = {
    "settings": {
        "plugins": ["plugin3"],
        "language": "en"
    }
}
merged_dict = merge(dict1, dict2)
print(merged_dict)
# {
#    "settings": {
#      "theme": "dark",
#      "plugins": ["plugin1", "plugin2", "plugin3"],
#      "language": "en"
# }

Documentation

For more detailed documentation, including advanced usage and customization options, please visit the official documentation.

Contributing

Contributions are welcome! Please feel free to submit issues or pull requests on the GitHub repository.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fuso-0.2.3.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fuso-0.2.3-py3-none-any.whl (7.0 kB view details)

Uploaded Python 3

File details

Details for the file fuso-0.2.3.tar.gz.

File metadata

  • Download URL: fuso-0.2.3.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.15 {"installer":{"name":"uv","version":"0.9.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fuso-0.2.3.tar.gz
Algorithm Hash digest
SHA256 72c9dce7d523212b60a63560bdbaf651d081ae535c73a4cf28840be46d37b2e5
MD5 a0fdf826c7f85df1d615412fe3725068
BLAKE2b-256 b11441df44e727145dbb3dbe3c7f17b5f1366ff1862b771d458f4260f34852e8

See more details on using hashes here.

File details

Details for the file fuso-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: fuso-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 7.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: uv/0.9.15 {"installer":{"name":"uv","version":"0.9.15","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

File hashes

Hashes for fuso-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 5922b466e0fb8c18bfa3994340e3fc21412f9df2a68f9c9edfffe54b11b1cc9d
MD5 c862c235713a61144a10a20e639c2e0c
BLAKE2b-256 1630b411debf85f2ab11aa79a08129633d127ec8c3f53b8d5b04b7b086f3368c

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page