https://github.com/makegov/procurement-tools
Python tools for navigating federal contracting
https://github.com/makegov/procurement-tools
procurement-data
Last synced: 8 months ago
JSON representation
Python tools for navigating federal contracting
- Host: GitHub
- URL: https://github.com/makegov/procurement-tools
- Owner: makegov
- License: apache-2.0
- Created: 2023-11-20T20:49:05.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-05-02T20:56:34.000Z (about 2 years ago)
- Last Synced: 2025-04-27T14:19:19.117Z (about 1 year ago)
- Topics: procurement-data
- Language: HTML
- Homepage: https://pypi.org/project/procurement-tools/
- Size: 1.2 MB
- Stars: 11
- Watchers: 0
- Forks: 3
- Open Issues: 10
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# procurement-tools
[](https://pypi.org/project/procurement-tools/)
A handy collection of python utilities and tools to navigate federal contracting.
## Features
- [x] UEI validation
- [x] Get a URL for an entity from USASpending
- [x] Get recent award data for an entity from USASpending
- [x] Lookup a FAR provision by citation
- [x] Get entity information from the SAM entity
- [x] Access innovations from the Periodic Table of Acquisition Innovations
## Usage
For full documentation, head to [the docs](https://procurement-tools.readthedocs.io/en/latest/).
```py
from procurement_tools import FAR, UEI, USASpending, PeriodicTable
print(UEI.is_valid("J7M9HPTGJ1S9"))
# True
print(USASpending.get_usaspending_URL("J7M9HPTGJ1S9"))
# 'https://www.usaspending.gov/recipient/bf1220c1-2373-042a-e8e1-33d5a29639d0-P/latest'
print(FAR.get_section("17.502-2"))
# Returns a pydantic model with the title, section number, url, and text of the section
print(PeriodicTable.get_random_innovation())
# Returns a dict with an innovation from the FAI Periodic Table of Acquisition Innovations
```
Additionally, we have the beginning of a SAM API client:
```python
from procurement_tools import SAM
res = SAM.get_entity({"ueiSAM":"XRVFU3YRA2U5"})
print(res)
# Returns a pydantic model with the latest SAM data for a given Entity
```
## CLI Usage
Out of the box, there is a simple CLI, called `fargo`. You can use it to do things like:
```sh
fargo sam entity [UEI]
# Dumps a json of an entity's information
fargo sam opportunities --q "machine"
# Dumps a json of active opportunities that match the keyword "machine"
fargo usaspending [UEI] --awards
# Dumps a json of an entity's 10 most recent awards (in the last 90 days)
```
Check out [the docs](https://procurement-tools.readthedocs.io/en/latest/cli.html) for all of the CLI options
## Installation
```sh
pip install procurement-tools
```
The SAM API client requires that the local environment variable `SAM_API_KEY` be set. See the [SAM API Docs](https://open.gsa.gov/api/entity-api/#individual-personal-accounts) for information on obtaining an API key.
## License
Apache 2.0