{"id":19741921,"url":"https://github.com/pyo3/pyproject-toml-rs","last_synced_at":"2025-04-04T15:11:27.454Z","repository":{"id":42535862,"uuid":"363665160","full_name":"PyO3/pyproject-toml-rs","owner":"PyO3","description":"pyproject.toml parser in Rust","archived":false,"fork":false,"pushed_at":"2024-10-24T09:20:13.000Z","size":97,"stargazers_count":24,"open_issues_count":2,"forks_count":9,"subscribers_count":12,"default_branch":"main","last_synced_at":"2024-10-25T05:27:29.675Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/PyO3.png","metadata":{"files":{"readme":"README.md","changelog":"Changelog.md","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":"2021-05-02T14:03:57.000Z","updated_at":"2024-10-24T09:20:17.000Z","dependencies_parsed_at":"2023-02-15T14:31:12.487Z","dependency_job_id":"3ee8e747-7da0-47ad-865b-67cd52915bee","html_url":"https://github.com/PyO3/pyproject-toml-rs","commit_stats":null,"previous_names":[],"tags_count":25,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyO3%2Fpyproject-toml-rs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyO3%2Fpyproject-toml-rs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyO3%2Fpyproject-toml-rs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/PyO3%2Fpyproject-toml-rs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/PyO3","download_url":"https://codeload.github.com/PyO3/pyproject-toml-rs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247198467,"owners_count":20900081,"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":"2024-11-12T01:28:26.831Z","updated_at":"2025-04-04T15:11:27.440Z","avatar_url":"https://github.com/PyO3.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pyproject-toml-rs\n\n[![GitHub Actions](https://github.com/PyO3/pyproject-toml-rs/workflows/CI/badge.svg)](https://github.com/PyO3/pyproject-toml-rs/actions?query=workflow%3ACI)\n[![Crates.io](https://img.shields.io/crates/v/pyproject-toml.svg)](https://crates.io/crates/pyproject-toml)\n[![docs.rs](https://docs.rs/pyproject-toml/badge.svg)](https://docs.rs/pyproject-toml/)\n\n`pyproject.toml` parser in Rust.\n\n## Installation\n\nAdd it to your ``Cargo.toml``:\n\n```toml\n[dependencies]\npyproject-toml = \"0.8\"\n```\n\nthen you are good to go. If you are using Rust 2015 you have to add ``extern crate pyproject_toml`` to your crate root as well.\n\n## Extended parsing\n\nIf you want to add additional fields parsing, you can do it with [`serde`](https://github.com/serde-rs/serde)'s\n[`flatten`](https://serde.rs/field-attrs.html#flatten) feature and implement the [`Deref`](https://doc.rust-lang.org/std/ops/trait.Deref.html) trait,\nfor example:\n\n```rust\nuse serde::{Deserialize, Serialize};\n\n#[derive(Serialize, Deserialize, Debug, Clone)]\npub struct PyProjectToml {\n    #[serde(flatten)]\n    inner: pyproject_toml::PyProjectToml,\n    tool: Option\u003cTool\u003e,\n}\n\n#[derive(Serialize, Deserialize, Debug, Clone)]\n#[serde(rename_all = \"kebab-case\")]\npub struct Tool {\n    maturin: Option\u003cToolMaturin\u003e,\n}\n\n#[derive(Serialize, Deserialize, Debug, Clone)]\n#[serde(rename_all = \"kebab-case\")]\npub struct ToolMaturin {\n    sdist_include: Option\u003cVec\u003cString\u003e\u003e,\n}\n\nimpl std::ops::Deref for PyProjectToml {\n    type Target = pyproject_toml::PyProjectToml;\n\n    fn deref(\u0026self) -\u003e \u0026Self::Target {\n        \u0026self.inner\n    }\n}\n\nimpl PyProjectToml {\n    pub fn new(content: \u0026str) -\u003e Result\u003cSelf, toml::de::Error\u003e {\n        toml::from_str(content)\n    }\n}\n```\n\n## License\n\nThis work is released under the MIT license. A copy of the license is provided in the [LICENSE](./LICENSE) file.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyo3%2Fpyproject-toml-rs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpyo3%2Fpyproject-toml-rs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpyo3%2Fpyproject-toml-rs/lists"}