{"id":27639308,"url":"https://github.com/fsprojects/fsharp.azure.storage","last_synced_at":"2025-09-13T08:14:34.975Z","repository":{"id":15300802,"uuid":"18030561","full_name":"fsprojects/FSharp.Azure.Storage","owner":"fsprojects","description":"F# API for using Microsoft Azure Table Storage service","archived":false,"fork":false,"pushed_at":"2022-03-14T05:25:51.000Z","size":3283,"stargazers_count":75,"open_issues_count":8,"forks_count":16,"subscribers_count":12,"default_branch":"master","last_synced_at":"2025-04-23T22:15:02.604Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"F#","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/fsprojects.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-03-23T09:55:52.000Z","updated_at":"2024-03-20T16:23:43.000Z","dependencies_parsed_at":"2022-08-25T16:51:04.285Z","dependency_job_id":null,"html_url":"https://github.com/fsprojects/FSharp.Azure.Storage","commit_stats":null,"previous_names":[],"tags_count":20,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fsprojects%2FFSharp.Azure.Storage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fsprojects%2FFSharp.Azure.Storage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fsprojects%2FFSharp.Azure.Storage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/fsprojects%2FFSharp.Azure.Storage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/fsprojects","download_url":"https://codeload.github.com/fsprojects/FSharp.Azure.Storage/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250522299,"owners_count":21444512,"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":[],"created_at":"2025-04-23T22:15:10.772Z","updated_at":"2025-04-23T22:15:11.482Z","avatar_url":"https://github.com/fsprojects.png","language":"F#","readme":"FSharp.Azure.Storage\n====================\n\nFSharp.Azure.Storage is a wrapper over the standard Microsoft [Microsoft.Azure.Cosmos.Table][1]\nlibrary that allows you to write idiomatic F# when talking to Azure.\n\nThe standard storage API is fine when you're writing C#, however when you're\nusing F# you want to be able to use immutable record types, use the native F#\nasync support and generally write in a functional style.\n\n[1]: \u003chttps://www.nuget.org/packages/Microsoft.Azure.Cosmos.Table\u003e\n\nNuGet [![NuGet Status](https://img.shields.io/nuget/v/FSharp.Azure.Storage.svg?style=flat)](https://www.nuget.org/packages/FSharp.Azure.Storage/)\n-----\n`Install-Package FSharp.Azure.Storage`\n\nA Quick Taster\n--------------\n### Inserting/Updating Table Storage\nImagine we had a record type that we wanted to save into table storage:\n\n```f#\nopen FSharp.Azure.Storage.Table\n\ntype Game =\n    { [\u003cPartitionKey\u003e] Developer: string\n      [\u003cRowKey\u003e] Name: string\n      HasMultiplayer: bool }\n```\n\nNow we'll define a helper function `inGameTable` that will allow us to persist these Game records to table storage into an existing table called \"Games\":\n\n```f#\nopen Microsoft.Azure.Cosmos.Table\n\nlet account = CloudStorageAccount.Parse \"UseDevelopmentStorage=true;\" //Or your connection string here\nlet tableClient = account.CreateCloudTableClient()\n\nlet inGameTable game = inTable tableClient \"Games\" game\n```\n\nNow that the set up ceremony is done, let's insert a new Game into table storage:\n\n```f#\nlet game = { Developer = \"343 Industries\"; Name = \"Halo 4\"; HasMultiplayer = true }\n\nlet result = game |\u003e Insert |\u003e inGameTable\n```\n\nLet's say we want to modify this game and update it in table storage:\n\n```f#\nlet modifiedGame = { game with HasMultiplayer = false }\n\nlet result2 = (modifiedGame, result.Etag) |\u003e Replace |\u003e inGameTable\n```\n\n### Querying Table Storage\n\nFirst we need to set up a little helper function for querying from the \"Games\" table:\n\n```f#\nlet fromGameTable q = fromTable tableClient \"Games\" q\n```\n\nHere's how we'd query for an individual record by PartitionKey and RowKey:\n\n```f#\nlet halo4, metadata =\n    Query.all\u003cGame\u003e\n    |\u003e Query.where \u003c@ fun g s -\u003e s.PartitionKey = \"343 Industries\" \u0026\u0026 s.RowKey = \"Halo 4\" @\u003e\n    |\u003e fromGameTable\n    |\u003e Seq.head\n```\n\nIf we wanted to find all multiplayer games made by Valve:\n\n```f#\nlet multiplayerValveGames =\n    Query.all\u003cGame\u003e\n    |\u003e Query.where \u003c@ fun g s -\u003e s.PartitionKey = \"Valve\" \u0026\u0026 g.HasMultiplayer @\u003e\n    |\u003e fromGameTable\n```\n\n### Further Information\nFor further documentation and examples, please visit the [wiki][2].\n\n[2]: https://github.com/fsprojects/FSharp.Azure.Storage/wiki\n\n\nBuilding\n--------\nRun `build.cmd` or `build.sh` to restore the required dependencies using Paket and then build and run tests using FAKE. You can also build in Visual Studio.\n\nBy default, the tests run against the Azure Storage Emulator. However, you can run them against any storage account by setting the `FSHARP_AZURE_STORAGE_CONNECTION_STRING` environment variable to an Azure Storage account connection string before running the tests.\n\n**AppVeyor (Windows)**\n[![AppVeyor Build status](https://ci.appveyor.com/api/projects/status/ssbhpme5jromcbmo?svg=true)](https://ci.appveyor.com/project/daniel-chambers/fsharp-azure-storage)\n\n**Travis (Linux)**\n[![Travis Build Status](https://travis-ci.org/fsprojects/FSharp.Azure.Storage.svg?branch=master)](https://travis-ci.org/fsprojects/FSharp.Azure.Storage)\n\n## Maintainer(s)\n\n- [@daniel-chambers](https://github.com/daniel-chambers)\n\nThe default maintainer account for projects under \"fsprojects\" is [@fsprojectsgit](https://github.com/fsprojectsgit) - F# Community Project Incubation Space (repo management)\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffsprojects%2Ffsharp.azure.storage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ffsprojects%2Ffsharp.azure.storage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ffsprojects%2Ffsharp.azure.storage/lists"}