Skip to main content

A python package for using the https://sourcestack.co/ API.

Project description

SourceStack

LICENSE PyPi GitHub

Installation

pip install sourcestack

Usage

Basic Usage

from sourcestack.search import SourceStackSearchService

# Initialize the service
service = SourceStackSearchService(api_key="your-api-key")

# Search for jobs
results = service.search_jobs(name="DevOps")

Basic Search Options

You can search jobs using different parameters:

# Search by job name (supports exact matching)
results = service.search_jobs(name="Platform Engineer", exact=True)

# Search by parent company
results = service.search_jobs(parent="Spotify")

# Search by company URL (automatically strips http://, https://, and www.)
results = service.search_jobs(url="company.com")

# Search by product usage (supports exact matching)
results = service.search_jobs(uses_product="Docker", exact=True)

# Search by product category
results = service.search_jobs(uses_category="Container Orchestration")

# Limit results
results = service.search_jobs(name="developer", limit=5)

Advanced Search

For advanced queries, you can use the advanced search functionality:

# Search with a filter
results = service.search_jobs_advanced(
    field="remote",
    operator="EQUALS",
    value=True
)

# Advanced search with limit
results = service.search_jobs_advanced(
    field="tags_matched",
    operator="CONTAINS_ANY",
    value=["Python"],
    limit=5
)

Advanced Search Operators

The following operators are supported:

  • Basic comparison: EQUALS, NOT_EQUALS, GREATER_THAN, LESS_THAN
  • List operations: IN, NOT_IN
  • Content matching: CONTAINS_ANY, NOT_CONTAINS_ANY, CONTAINS_ALL, NOT_CONTAINS_ALL

Search Results

The search results are returned in the following format:

{
    "status": "success",
    "timestamp": "2023-...",  # ISO format timestamp
    "count": int,
    "statistics": {
        "companies": [
            {"name": str, "count": int}
            # Top 5 most common companies
        ],
        "technologies": [
            {"name": str, "count": int}
            # Top 5 most common technologies
        ],
        "categories": [
            {"name": str, "count": int}
            # Top 5 most common categories
        ]
    },
    "entries": [
        {
            "job_name": str,
            "company_name": str,
            "company_url": str,
            "tags_matched": List[str],
            "tag_categories": List[str],
            "remote": bool,
            "country": str,
            # ... other job fields
        }
    ]
}

Important Notes

  • Only one search parameter can be used at a time in basic search
  • The exact parameter can only be used with name and uses_product searches
  • All searches are case-insensitive
  • Company URLs are automatically processed to remove common prefixes (http://, https://, www.)
  • Advanced search requires a field, operator, and value
  • The operator must be one of the supported operators listed above

Contributing

For development, install the package with development dependencies:

pip install -e ".[dev]"

Building

bin/build

Publishing

bin/publish

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

sourcestack-0.1.1.tar.gz (10.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sourcestack-0.1.1-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

Details for the file sourcestack-0.1.1.tar.gz.

File metadata

  • Download URL: sourcestack-0.1.1.tar.gz
  • Upload date:
  • Size: 10.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for sourcestack-0.1.1.tar.gz
Algorithm Hash digest
SHA256 8a5ab481a5b698f0dbfde14e274fdee162c6bf438caf77c3b779804a9e7e0dd8
MD5 d9fab4563a6645138c761f42714ab74d
BLAKE2b-256 a1906df4c7f10f78d7ed29bd492869a6c936e11c33ad7e67e92a927efef97e1f

See more details on using hashes here.

File details

Details for the file sourcestack-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: sourcestack-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 8.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for sourcestack-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e260db1248e47d107940ea66cf0914fa5a07f448425b3245aa717d250b1c76d4
MD5 964765ed2054e2f81556179d6468b4fe
BLAKE2b-256 6aab32d42729ebdb687c20f46a2e7f14024a77b1e0161cdbb17b3b9c89d72db3

See more details on using hashes here.

Supported by

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