Skip to main content

The `sam-scraper` is designed for seamless interaction with the sam.gov API,

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

sam_scraper-0.1.0-py3-none-any.whl (5.3 kB view details)

Uploaded Python 3

File details

Details for the file sam_scraper-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: sam_scraper-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 5.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for sam_scraper-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 2bbfa9616b9396cf8c32bf4f41a0b0de89f1a48f63a0800a8a2d3e8f11f8679f
MD5 408b157461a277031af02a09034dcef0
BLAKE2b-256 5b47c9a0c9ff7c9e8e8c6ae02f558ec684a95d3113f19cb7d389b7958264c255

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page