Sam Scraper
Introduction
The sam-scraper Python package is designed for seamless interaction with the sam.gov API, enabling efficient search operations, detailed retrieval of records, and resource downloads.
Features
- Advanced Search Capabilities: Execute detailed searches using criteria such as relevance, status, and result limits.
- Detailed Information Retrieval: Access in-depth details for records, including exclusion details and resource information.
- Resource Download: Directly download resource files using specific record IDs.
- Ease of Use: Offers intuitive methods and clear documentation for an optimal user experience.
Installation
To install sam-scraper, run the following command in your terminal:
pip install sam-scraper
Usage
Below is a step-by-step guide on how to utilize sam-scraper in your projects.
Importing the Module
First, import the Sam class from the sam_scraper package:
from sam import Sam
Creating an Instance
Instantiate the Sam class:
sam = Sam.Scraper()
Performing a Search
To perform a search using the sam.gov API, use the search method. You can specify parameters such as sort, status, and limit:
results = sam.search(sort="relevance", status="active", limit="10")
print(results)
Getting Detailed Information
Retrieve detailed information of a record by providing an ID. This ID can be obtained from the search results:
details = sam.get_details(id="962c49a01a204a25bfcad1b4c894b4ed")
print(details)
Downloading a Resource
Download a resource file associated with a specific ID by using the download_resource method:
sam.download_resource(ID="resource_id", name_file="desired_filename.pdf")
License
This project is licensed under the MIT License - see the `LICENSE.md` file for details.
Metadata
Release files for sam-scraper 0.1.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sam-scraper-0.1.2.tar.gz | 4.8 kB | Without provenance | Details for sam-scraper-0.1.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sam_scraper-0.1.2-py3-none-any.whl | Python 3 | none | any | Details for sam_scraper-0.1.2-py3-none-any.whl |
Total release size: 10.1 kB
Release files / sam-scraper-0.1.2.tar.gz
| Download URL | sam-scraper-0.1.2.tar.gz |
|---|---|
| Size | 4.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
94041697a8fce760b64ce157972b8f18f99f612d1057f05048e4568f4952a8d6
|
|
BLAKE2b-256 checksum How to use checksums |
ebc21987465abb6bce7a4230e6d0548021d23aea2731df85c436ddf488f5825b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.2
|
Release files / sam_scraper-0.1.2-py3-none-any.whl
| Download URL | sam_scraper-0.1.2-py3-none-any.whl |
|---|---|
| Size | 5.4 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
471d8018af845117c46b3325c7d7ee098b5b5221fa72f543169d0fbf9f066d50
|
|
BLAKE2b-256 checksum How to use checksums |
c3cec48b7a5870fe0c268690f4c866269b74f9892ae377f3f319d01b8f47e067
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.11.2
|
Security for sam-scraper 0.1.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.