Name | fpds JSON |
Version |
1.5.0
JSON |
| download |
home_page | None |
Summary | A parser for the Federal Procurement Data System (FPDS) Atom feed |
upload_time | 2025-07-14 22:38:25 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.11 |
license | The MIT License Copyright (c) 2022 Derek Herincx Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
fpds
python
atom feed
cli
xml
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# fpds
A light-weight, pythonic parser for the Federal Procurement Data System (FPDS) ATOM Feed.
Reference [here](https://www.fpds.gov/fpdsng_cms/index.php/en/).
## Motivation
The FPDS ATOM feed limits each request to 10 records, which forces users to deal with pagination. Additonally, data is exported as XML, which proves annoying. `fpds` will handle all pagination and data
transformation to provide users with a nice JSON representation of the
equivalent XML data and attributes.
## Setup
As of version 1.5.0, this library manages dependencies using `uv`. It is
_highly_ recommended since this library is tested with it.
### Installing `uv`
You can follow any of the methods found [here](https://docs.astral.sh/uv/getting-started/installation/). If on Linux or MacOS, we recommend using Homebrew:
```
$ brew install uv
```
Once `uv` is installed, you can use the project Makefile to ensure your local environment is synced with the latest library installation. Start by running `make install` — this will check the status of the `uv.lock` file, and install all project dependencies + extras
### Local Development
For linting and formatting, we use `ruff`. See `pyproject.toml`
for specific configuration.
```
$ make formatters
```
You can clean the clutter and unwanted noise from tools using:
```
$ make clean
```
### Testing
```
$ make local-test
```
## Usage
For a list of valid search criteria parameters, consult FPDS documentation
found [here](https://www.fpds.gov/wiki/index.php/Atom_Feed_Usage). Parameters
will follow the `URL String` format shown in the link above, with the
following exceptions:
+ Colons (:) will be replaced by equal signs (=)
+ Certain parameters enclose their value in quotations. `fpds` will
automatically determine if quotes are needed, so simply enclose your
entire criteria string in quotes.
For example, `AGENCY_CODE:"3600"` should be used as `"AGENCY_CODE=3600"`.
Via CLI:
```
$ fpds parse "LAST_MOD_DATE=[2022/01/01, 2022/05/01]" "AGENCY_CODE=7504"
```
By default, data will be dumped into an `.fpds` folder at the user's
`$HOME` directory. If you wish to override this behavior, provide the `-o`
option. The directory will be created if it doesn't exist.
As of v1.5.0, you can opt out of regex validation by setting the `-k` flag
to `False` — this is helpful in scenarios when either the regex pattern has
been altered by the ATOM feed or a new parameter name is supported, but not
yet added to the configuration in this library.
```
$ fpds parse "LAST_MOD_DATE=[2022/01/01, 2022/05/01]" "AGENCY_CODE=7504" -o ~/.my-preferred-dir
```
Same request via python interpreter:
```
import asyncio
from fpds import fpdsRequest
request = fpdsRequest(
LAST_MOD_DATE="[2022/01/01, 2022/05/01]",
AGENCY_CODE="7504"
)
# returns records as an async generator
gen = request.iter_data()
# evaluating generator entries
records = []
async for entry in gen:
records.append(entry)
# or letting `data` method evaluate generator for you
records = asyncio.run(request.data())
```
# Highlights
Between v1.2.1 and v1.3.0, significant improvements were made with `asyncio`. Here are some rough benchmarks in estimated data extraction + post-processing
times:
| v1.2.1 | v.1.3.0 |
-------- | --------
188.46 | 29.40
190.38 | 28.14
187.20 | 27.66
Using `v.1.2.1`, the average completion time is 188.68 seconds (~3min).
Using `v.1.3.0`, the average completion time is 28.40 seconds.
This equates to a <u>**84.89%**</u> decrease in completion time!
# Notes
Please be aware that this project is an after-hours passion of mine. I do my best to accomodate requests the best I can, but I receive no $$$ for any of the work I do here.
Raw data
{
"_id": null,
"home_page": null,
"name": "fpds",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": null,
"keywords": "fpds, python, atom feed, cli, xml",
"author": null,
"author_email": "Derek Herincx <derek663@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/fb/a5/aa282e251f7070a4dcc01d6b1ea35d7e00489290b6039c46ca1cb76d596e/fpds-1.5.0.tar.gz",
"platform": null,
"description": "# fpds\nA light-weight, pythonic parser for the Federal Procurement Data System (FPDS) ATOM Feed.\nReference [here](https://www.fpds.gov/fpdsng_cms/index.php/en/).\n\n\n## Motivation\nThe FPDS ATOM feed limits each request to 10 records, which forces users to deal with pagination. Additonally, data is exported as XML, which proves annoying. `fpds` will handle all pagination and data\ntransformation to provide users with a nice JSON representation of the\nequivalent XML data and attributes.\n\n\n## Setup\nAs of version 1.5.0, this library manages dependencies using `uv`. It is\n_highly_ recommended since this library is tested with it.\n\n\n### Installing `uv`\n\nYou can follow any of the methods found [here](https://docs.astral.sh/uv/getting-started/installation/). If on Linux or MacOS, we recommend using Homebrew:\n\n```\n$ brew install uv\n```\n\nOnce `uv` is installed, you can use the project Makefile to ensure your local environment is synced with the latest library installation. Start by running `make install` \u2014 this will check the status of the `uv.lock` file, and install all project dependencies + extras\n\n### Local Development\n\nFor linting and formatting, we use `ruff`. See `pyproject.toml`\nfor specific configuration.\n\n```\n$ make formatters\n```\n\nYou can clean the clutter and unwanted noise from tools using:\n\n```\n$ make clean\n```\n\n### Testing\n```\n$ make local-test\n```\n\n## Usage\nFor a list of valid search criteria parameters, consult FPDS documentation\nfound [here](https://www.fpds.gov/wiki/index.php/Atom_Feed_Usage). Parameters\nwill follow the `URL String` format shown in the link above, with the\nfollowing exceptions:\n\n + Colons (:) will be replaced by equal signs (=)\n + Certain parameters enclose their value in quotations. `fpds` will\nautomatically determine if quotes are needed, so simply enclose your\nentire criteria string in quotes.\n\n For example, `AGENCY_CODE:\"3600\"` should be used as `\"AGENCY_CODE=3600\"`.\n\nVia CLI:\n```\n$ fpds parse \"LAST_MOD_DATE=[2022/01/01, 2022/05/01]\" \"AGENCY_CODE=7504\"\n```\n\nBy default, data will be dumped into an `.fpds` folder at the user's\n`$HOME` directory. If you wish to override this behavior, provide the `-o`\noption. The directory will be created if it doesn't exist.\n\nAs of v1.5.0, you can opt out of regex validation by setting the `-k` flag\nto `False` \u2014 this is helpful in scenarios when either the regex pattern has\nbeen altered by the ATOM feed or a new parameter name is supported, but not\nyet added to the configuration in this library.\n\n```\n$ fpds parse \"LAST_MOD_DATE=[2022/01/01, 2022/05/01]\" \"AGENCY_CODE=7504\" -o ~/.my-preferred-dir\n```\n\nSame request via python interpreter:\n```\nimport asyncio\nfrom fpds import fpdsRequest\n\nrequest = fpdsRequest(\n LAST_MOD_DATE=\"[2022/01/01, 2022/05/01]\",\n AGENCY_CODE=\"7504\"\n)\n\n# returns records as an async generator\ngen = request.iter_data()\n\n# evaluating generator entries\nrecords = []\nasync for entry in gen:\n records.append(entry)\n\n# or letting `data` method evaluate generator for you\nrecords = asyncio.run(request.data())\n```\n\n\n# Highlights\n\nBetween v1.2.1 and v1.3.0, significant improvements were made with `asyncio`. Here are some rough benchmarks in estimated data extraction + post-processing\ntimes:\n\n| v1.2.1 | v.1.3.0 |\n-------- | --------\n188.46 | 29.40\n190.38 | 28.14\n187.20 | 27.66\n\nUsing `v.1.2.1`, the average completion time is 188.68 seconds (~3min).\nUsing `v.1.3.0`, the average completion time is 28.40 seconds.\n\nThis equates to a <u>**84.89%**</u> decrease in completion time!\n\n# Notes\n\nPlease be aware that this project is an after-hours passion of mine. I do my best to accomodate requests the best I can, but I receive no $$$ for any of the work I do here.\n",
"bugtrack_url": null,
"license": "The MIT License Copyright (c) 2022 Derek Herincx Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. ",
"summary": "A parser for the Federal Procurement Data System (FPDS) Atom feed",
"version": "1.5.0",
"project_urls": {
"Issues": "https://github.com/dherincx92/fpds/issues",
"Repository": "https://github.com/dherincx92/fpds"
},
"split_keywords": [
"fpds",
" python",
" atom feed",
" cli",
" xml"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "080a28b9bb1896c367439559768257f8adec219ebad4490fcf5675436fb25d7a",
"md5": "83a90837ac42c1db84870c73db3bf2f1",
"sha256": "adcb6666cf33259463febc5456a8f357ec9d53c8f9b3030c031240e959d81ad8"
},
"downloads": -1,
"filename": "fpds-1.5.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "83a90837ac42c1db84870c73db3bf2f1",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11",
"size": 21939,
"upload_time": "2025-07-14T22:38:24",
"upload_time_iso_8601": "2025-07-14T22:38:24.558332Z",
"url": "https://files.pythonhosted.org/packages/08/0a/28b9bb1896c367439559768257f8adec219ebad4490fcf5675436fb25d7a/fpds-1.5.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "fba5aa282e251f7070a4dcc01d6b1ea35d7e00489290b6039c46ca1cb76d596e",
"md5": "1a2ec5bb5ba0ee6e997cef39bb68e544",
"sha256": "fac208a4050c5891f9f30b3dbf1ec4f1acd337513fa603202dc6a33ee690fb92"
},
"downloads": -1,
"filename": "fpds-1.5.0.tar.gz",
"has_sig": false,
"md5_digest": "1a2ec5bb5ba0ee6e997cef39bb68e544",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 109584,
"upload_time": "2025-07-14T22:38:25",
"upload_time_iso_8601": "2025-07-14T22:38:25.716618Z",
"url": "https://files.pythonhosted.org/packages/fb/a5/aa282e251f7070a4dcc01d6b1ea35d7e00489290b6039c46ca1cb76d596e/fpds-1.5.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-14 22:38:25",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "dherincx92",
"github_project": "fpds",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "fpds"
}