{"id":16162741,"url":"https://github.com/msrd0/gotham_formdata","last_synced_at":"2025-03-16T10:30:34.704Z","repository":{"id":37979286,"uuid":"307824173","full_name":"msrd0/gotham_formdata","owner":"msrd0","description":"Form data parsing for the gotham web framework","archived":false,"fork":false,"pushed_at":"2024-05-20T04:43:29.000Z","size":277994,"stargazers_count":3,"open_issues_count":5,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-27T07:30:54.982Z","etag":null,"topics":["data","form","gotham","html","http","multipart","rust","server","urlencoded"],"latest_commit_sha":null,"homepage":"","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/msrd0.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"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}},"created_at":"2020-10-27T20:48:23.000Z","updated_at":"2023-02-04T19:04:51.000Z","dependencies_parsed_at":"2024-01-10T12:30:43.783Z","dependency_job_id":"98f4513c-97a4-45ac-8e12-a03356f176b1","html_url":"https://github.com/msrd0/gotham_formdata","commit_stats":{"total_commits":128,"total_committers":4,"mean_commits":32.0,"dds":0.265625,"last_synced_commit":"2c75464749a0efb9fd8c92df2e106e2325cdb6a5"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msrd0%2Fgotham_formdata","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msrd0%2Fgotham_formdata/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msrd0%2Fgotham_formdata/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/msrd0%2Fgotham_formdata/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/msrd0","download_url":"https://codeload.github.com/msrd0/gotham_formdata/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243809886,"owners_count":20351407,"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","form","gotham","html","http","multipart","rust","server","urlencoded"],"created_at":"2024-10-10T02:32:39.906Z","updated_at":"2025-03-16T10:30:34.401Z","avatar_url":"https://github.com/msrd0.png","language":"Rust","readme":"\u003c!-- alpha code warning with spacing above --\u003e\n\u003cbr/\u003e\n\u003cdiv align=\"center\"\u003e\n\t:warning: \u003cspan color=\"#ffcc4d\"\u003eThis crate is still alpha. APIs are subject to change.\u003c/span\u003e :warning:\n\u003c/div\u003e\n\n\u003c!-- headline --\u003e\n\u003cdiv align=\"center\"\u003e\n\t\u003ch1\u003egotham_formdata :writing_hand:\u003c/h1\u003e\n\u003c/div\u003e\n\n\u003c!-- badges --\u003e\n\u003cdiv align=\"center\"\u003e\n\t\u003ca href=\"https://crates.io/crates/gotham_formdata\"\u003e\n\t\t\u003cimg alt=\"crates.io\" src=\"https://img.shields.io/crates/v/gotham_formdata.svg\"/\u003e\n\t\u003c/a\u003e\n\t\u003ca href=\"https://docs.rs/crate/gotham_formdata\"\u003e\n\t\t\u003cimg alt=\"docs.rs\" src=\"https://docs.rs/gotham_formdata/badge.svg\"/\u003e\n\t\u003c/a\u003e\n\t\u003ca href=\"https://msrd0.github.io/gotham_formdata/doc/gotham_formdata/index.html\"\u003e\n\t\t\u003cimg alt=\"docs for main\" src=\"https://img.shields.io/badge/docs-main-blue.svg\"/\u003e\n\t\u003c/a\u003e\n\t\u003ca href=\"https://blog.rust-lang.org/2023/06/01/Rust-1.70.0.html\"\u003e\n\t\t\u003cimg alt=\"Rust 1.70+\" src=\"https://img.shields.io/badge/rustc-1.63+-orange.svg\"/\u003e\n\t\u003c/a\u003e\n\t\u003ca href=\"https://www.apache.org/licenses/LICENSE-2.0\"\u003e\n\t\t\u003cimg alt=\"License Apache-2.0\" src=\"https://img.shields.io/badge/license-Apache--2.0-blue.svg\"/\u003e\n\t\u003c/a\u003e\n\u003c/div\u003e\n\u003cdiv align=\"center\"\u003e\n\t\u003ca href=\"https://github.com/msrd0/gotham_formdata/actions?query=workflow%3ARust\"\u003e\n\t\t\u003cimg alt=\"GitHub Actions\" src=\"https://github.com/msrd0/gotham_formdata/workflows/Rust/badge.svg\"/\u003e\n\t\u003c/a\u003e\n\t\u003ca href=\"https://msrd0.github.io/gotham_formdata/tarpaulin-report.html\"\u003e\n\t\t\u003cimg alt=\"Coverage Report\" src=\"https://msrd0.github.io/gotham_formdata/coverage.svg\"/\u003e\n\t\u003c/a\u003e\n\t\u003ca href=\"https://deps.rs/repo/github/msrd0/gotham_formdata\"\u003e\n\t\t\u003cimg alt=\"dependencies\" src=\"https://deps.rs/repo/github/msrd0/gotham_formdata/status.svg\"/\u003e\n\t\u003c/a\u003e\n\u003c/div\u003e\n\u003cbr/\u003e\n\nThis crate is an extension to the popular [gotham web framework][gotham] for Rust. It aims to\nreduce boilerplate necessary to read request bodies today as a stop-gap until gotham finally\nimplements a [body extractor].\n\n## :sparkles: Features\n\n- Parse `application/x-www-form-urlencoded` request bodies\n- Parse `multipart/form-data` request bodies\n- Verify the parsed request body\n- `#![forbid(unsafe_code)]` ensures that all functionality is implemented in 100% safe Rust code\n\n## :warning: Warning\n\nThis crate is asynchronous, but does not yet enforce uploads limits. **YOU ARE RESPONSIBLE\nFOR ENFORCING UPLOAD LIMITS.**\n\n## :spiral_notepad: Example\n\n```rust\nuse gotham_formdata::FormData;\nuse validator::Validate;\n\n#[derive(FormData, Validate)]\nstruct LoginData {\n\t#[validate(length(min = 5, max = 16))]\n\tusername: String,\n\t#[validate(length(min = 8))]\n\tpassword: String\n}\n\nasync fn login_handler(state: \u0026mut State) -\u003e Result\u003cResponse\u003cBody\u003e, HandlerError\u003e {\n\tlet login_data: LoginData = FormData::parse_form_data(state).await?;\n\tOk(if login_data.password == \"secret\" {\n\t\tcreate_response(state, StatusCode::OK, TEXT_PLAIN, login_data.username)\n\t} else {\n\t\tcreate_empty_response(state, StatusCode::FORBIDDEN)\n\t})\n}\n```\n\n## :label: Versioning\n\nLike all rust crates, this crate will follow semantic versioning guidelines. However, changing\nthe MSRV (minimum supported rust version) is not considered a breaking change.\n\n## :page_with_curl: License\n\n```\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n\thttps://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.\n```\n\n [body extractor]: https://github.com/gotham-rs/gotham/issues/11\n [gotham]: https://github.com/gotham-rs/gotham\n [multipart]: https://crates.io/crates/multipart\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsrd0%2Fgotham_formdata","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmsrd0%2Fgotham_formdata","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmsrd0%2Fgotham_formdata/lists"}