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.0.9.tar.gz (10.4 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.0.9-py3-none-any.whl (8.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for sourcestack-0.0.9.tar.gz
Algorithm Hash digest
SHA256 54612eebd19733f1b2c89e6ddfcc46ad2afbf9987fc429412227892fcf6a181a
MD5 f0c4e34c782bbaef9b4c83cd6cce710d
BLAKE2b-256 77679e96b06a8928821291d8e5e9584da0598f06a75e598bb9f08d4cc9379f12

See more details on using hashes here.

File details

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

File metadata

  • Download URL: sourcestack-0.0.9-py3-none-any.whl
  • Upload date:
  • Size: 8.6 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.0.9-py3-none-any.whl
Algorithm Hash digest
SHA256 475aed59bb0c8089db2aaff4133c3a6e2bc2cf2c527316fbd244fa60c8f93b95
MD5 e7e23476ce8c4660972c774962c77b21
BLAKE2b-256 29022098939eb12702752690d31bf88c208b39ae45e22ac3d80ec4b627b9cd5b

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