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 Distribution

sam-scraper-0.1.2.tar.gz (4.8 kB view details)

Uploaded Source

Built Distribution

sam_scraper-0.1.2-py3-none-any.whl (5.4 kB view details)

Uploaded Python 3

File details

Details for the file sam-scraper-0.1.2.tar.gz.

File metadata

  • Download URL: sam-scraper-0.1.2.tar.gz
  • Upload date:
  • Size: 4.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.11.2

File hashes

Hashes for sam-scraper-0.1.2.tar.gz
Algorithm Hash digest
SHA256 94041697a8fce760b64ce157972b8f18f99f612d1057f05048e4568f4952a8d6
MD5 d714e7eecb33606df5b379e77157a0b1
BLAKE2b-256 ebc21987465abb6bce7a4230e6d0548021d23aea2731df85c436ddf488f5825b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sam_scraper-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 5.4 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.2-py3-none-any.whl
Algorithm Hash digest
SHA256 471d8018af845117c46b3325c7d7ee098b5b5221fa72f543169d0fbf9f066d50
MD5 e5856f31c198399c15d125857961828d
BLAKE2b-256 c3cec48b7a5870fe0c268690f4c866269b74f9892ae377f3f319d01b8f47e067

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