{"id":26900292,"url":"https://github.com/fusedio/udfs","last_synced_at":"2025-05-16T02:07:38.591Z","repository":{"id":225053722,"uuid":"760140390","full_name":"fusedio/udfs","owner":"fusedio","description":"Public Fused UDFs. Build any scale workflows with the Fused Python SDK and Workbench webapp, and integrate them into your stack with the Fused Hosted API.","archived":false,"fork":false,"pushed_at":"2025-05-09T14:41:47.000Z","size":13041,"stargazers_count":232,"open_issues_count":19,"forks_count":47,"subscribers_count":9,"default_branch":"main","last_synced_at":"2025-05-09T15:45:26.227Z","etag":null,"topics":["data-science","earth-observation","geo","geopython","geospatial","geospatial-analysis","gis","python","raster","spatial","timeseries-analysis","udf","vector"],"latest_commit_sha":null,"homepage":"https://www.fused.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/fusedio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-02-19T21:22:12.000Z","updated_at":"2025-05-09T14:41:50.000Z","dependencies_parsed_at":"2024-04-17T17:37:02.719Z","dependency_job_id":"1d0bfc0b-b1a4-43b0-86d0-dd898a42df10","html_url":"https://github.com/fusedio/udfs","commit_stats":null,"previous_names":["fusedio/udfs"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fusedio%2Fudfs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fusedio%2Fudfs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fusedio%2Fudfs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fusedio%2Fudfs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fusedio","download_url":"https://codeload.github.com/fusedio/udfs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":254453652,"owners_count":22073617,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-science","earth-observation","geo","geopython","geospatial","geospatial-analysis","gis","python","raster","spatial","timeseries-analysis","udf","vector"],"created_at":"2025-04-01T07:26:06.662Z","updated_at":"2025-05-16T02:07:38.572Z","avatar_url":"https://github.com/fusedio.png","language":"Python","readme":"\u003ch1 align=\"center\"\u003e\n  Fused Python UDFs\n\u003c/h1\u003e\n\u003ch3 align=\"center\"\u003e\n  🌎 Code to Map. Instantly.\n\u003c/h3\u003e\n\u003cbr\u003e\u003cbr\u003e\n\n![alt text](https://fused-magic.s3.us-west-2.amazonaws.com/docs_assets/github_udfs_repo/readme_udf_explorer.png)\n\nThis repo is a public collection of Fused User Defined Functions (UDFs).\n\nFused is the glue layer that interfaces data platforms and data tools via a managed serverless API. With Fused, you can write, share, or discover UDFs which are the building blocks of serverless geospatial operations. UDFs are Python functions that turn into live HTTP endpoints that load their output into any tools that can call an API.\n\n## Quickstart\n\n### 1. Install Fused Python SDK\n\n[![PyPI Version](https://img.shields.io/pypi/v/fused.svg)](https://pypi.python.org/pypi/fused)\n\nThe Fused Python SDK is available at [PyPI](https://pypi.org/project/fused/). Use the standard Python [installation tools](https://packaging.python.org/en/latest/tutorials/installing-packages/). UDFs this repo expect the most recent version.\n\n```bash\npython3 -m venv .venv\nsource .venv/bin/activate\npip install fused\n```\n\nIt's possible that to run UDFs locally the local environment might require additional packages not found locally. If that is the case, this command installs all required dependencies.\n```bash\n!pip install fused odc-stac duckdb numba xarray-spatial planetary-computer 'odc-stac[botocore]' py3dep stackstac pynhd boto3\n```\n\n### 2. Load a UDF into a workflow\n\nThis snippet shows how to import a UDF from this repo into a Python environment. The URL is of the directory that contains a UDF generated with Fused.\n\n```python\nimport fused\n\nudf = fused.load(\"https://github.com/fusedio/udfs/tree/main/public/DuckDB_NYC_Example\")\ngdf = fused.run(udf=udf)\ngdf\n```\n\nSimilarly, as a bash oneliner.\n\n```python\npython -c \"import fused; udf = fused.load('https://github.com/fusedio/udfs/tree/main/public/DuckDB_NYC_Example'); print(fused.run(udf=udf));\"\n```\n\n## Walkthrough\n\n### Repo structure\n\nThis repository is structured to facilitate easy access of UDFs and their supporting files. Each UDF, like `Sample_UDF`, is contained within its own subdirectory within the `public` directory - along with its documentation, code, metadata, and utility function code.\n\nEach UDF can be thought of as a standalone Python package.\n\n```\n├── README.md\n└── public\n    └── Sample_UDF\n        ├── README.MD\n        ├── Sample_UDF.py\n        ├── meta.json\n        └── utils.py\n```\n\nFiles relevant to each UDF are:\n- `README.md` Provides details of the UDF's purpose and how it works.\n- `Sample_UDF.py` This eponymous Python file contains the UDF's business logic as a Python function decorated with `@fused.udf`.\n- `meta.json` This file contains metadata needed to render the UDF in the Fused explorer and for the UDF to run correctly.\n- `utils.py` This Python file contains helper functions the UDF (optionally) imports and references.\n\n\n\n### Contribute a UDF\n\n1. Save UDF\n\n```python\nimport fused\n\n@fused.udf\ndef my_udf(bounds: fused.types.Tile = None):\n    import pandas as pd\n    return pd.DataFrame({'Hello': ['from Fused']})\n\n# Run locally\nprint(fused.run(my_udf))\n\n# Save locally\nmy_udf.to_directory('my_udf')\n# or for zip file: my_udf.to_file('my_udf.zip')\n\n# Save remotely to Fused\nmy_udf.to_fused('my_udf')\n```\n\n\"Save locally\" generates the UDF folder on your local system, which you'll use in the following step.\n\n2. Open a PR\n\nClone this repo to your local system and add the UDF folder under `public` or `community`. Create a PR on this repo.\n\n## Ecosystem\n\nBuild any scale workflows with the [Fused Python SDK](https://docs.fused.io/python-sdk/) and [Workbench webapp](https://docs.fused.io/workbench/), and integrate them into your stack by [calling then via HTTP](https://docs.fused.io/user-guide/out/http/)\n\n![alt text](https://fused-magic.s3.us-west-2.amazonaws.com/docs_assets/ecosystem_diagram.png)\n\n## Documentation\n\nFused documentation is in [docs.fused.io](https://docs.fused.io/).\n\n## Contribution guidelines\n\nAll UDF contributions, bug reports, bug fixes, documentation improvements, enhancements, and ideas are welcome.\n\n\n### Pre commit\n\nPlease run pre-commit hooks on your UDF prior to submitting.\n\n```\npre-commit install\npre-commit run --files public/PC_Sentinel2/*\n```\n\n## License\n\n[MIT License](./LICENSE)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffusedio%2Fudfs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffusedio%2Fudfs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffusedio%2Fudfs/lists"}