sourcestack


Namesourcestack JSON
Version 0.1.0 PyPI version JSON
download
home_pageNone
SummaryA python package for using the https://sourcestack.co/ API.
upload_time2025-02-23 00:44:36
maintainerNone
docs_urlNone
authorNone
requires_pythonNone
licenseMIT
keywords sourcestack
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # SourceStack

[![LICENSE](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/workflowing/sourcestack/blob/main/LICENSE)
[![PyPi](https://img.shields.io/pypi/v/sourcestack)](https://pypi.org/project/sourcestack/)
[![GitHub](https://img.shields.io/badge/github-repo-blue.svg)](https://github.com/workflowing/sourcestack)

## Installation

```bash
pip install sourcestack
```

## Usage

### Basic Usage

```python
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:

```python
# 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:

```python
# 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:

```python
{
    "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:

```bash
pip install -e ".[dev]"
```

### Building

```bash
bin/build
```

### Publishing

```bash
bin/publish
```

            

Raw data

            {
    "_id": null,
    "home_page": null,
    "name": "sourcestack",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "sourcestack",
    "author": null,
    "author_email": "Kevin Sylvestre <kevin@ksylvest.com>, Dean Singh <dean.singh@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/81/a0/926476e9eb161ece04437df781a18ec18fa9ebb5fd6b8cc5d49e12509c9c/sourcestack-0.1.0.tar.gz",
    "platform": null,
    "description": "# SourceStack\n\n[![LICENSE](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/workflowing/sourcestack/blob/main/LICENSE)\n[![PyPi](https://img.shields.io/pypi/v/sourcestack)](https://pypi.org/project/sourcestack/)\n[![GitHub](https://img.shields.io/badge/github-repo-blue.svg)](https://github.com/workflowing/sourcestack)\n\n## Installation\n\n```bash\npip install sourcestack\n```\n\n## Usage\n\n### Basic Usage\n\n```python\nfrom sourcestack.search import SourceStackSearchService\n\n# Initialize the service\nservice = SourceStackSearchService(api_key=\"your-api-key\")\n\n# Search for jobs\nresults = service.search_jobs(name=\"DevOps\")\n```\n\n### Basic Search Options\n\nYou can search jobs using different parameters:\n\n```python\n# Search by job name (supports exact matching)\nresults = service.search_jobs(name=\"Platform Engineer\", exact=True)\n\n# Search by parent company\nresults = service.search_jobs(parent=\"Spotify\")\n\n# Search by company URL (automatically strips http://, https://, and www.)\nresults = service.search_jobs(url=\"company.com\")\n\n# Search by product usage (supports exact matching)\nresults = service.search_jobs(uses_product=\"Docker\", exact=True)\n\n# Search by product category\nresults = service.search_jobs(uses_category=\"Container Orchestration\")\n\n# Limit results\nresults = service.search_jobs(name=\"developer\", limit=5)\n```\n\n### Advanced Search\n\nFor advanced queries, you can use the advanced search functionality:\n\n```python\n# Search with a filter\nresults = service.search_jobs_advanced(\n    field=\"remote\",\n    operator=\"EQUALS\",\n    value=True\n)\n\n# Advanced search with limit\nresults = service.search_jobs_advanced(\n    field=\"tags_matched\",\n    operator=\"CONTAINS_ANY\",\n    value=[\"Python\"],\n    limit=5\n)\n```\n\n### Advanced Search Operators\n\nThe following operators are supported:\n\n- Basic comparison: EQUALS, NOT_EQUALS, GREATER_THAN, LESS_THAN\n- List operations: IN, NOT_IN\n- Content matching: CONTAINS_ANY, NOT_CONTAINS_ANY, CONTAINS_ALL, NOT_CONTAINS_ALL\n\n### Search Results\n\nThe search results are returned in the following format:\n\n```python\n{\n    \"status\": \"success\",\n    \"timestamp\": \"2023-...\",  # ISO format timestamp\n    \"count\": int,\n    \"statistics\": {\n        \"companies\": [\n            {\"name\": str, \"count\": int}\n            # Top 5 most common companies\n        ],\n        \"technologies\": [\n            {\"name\": str, \"count\": int}\n            # Top 5 most common technologies\n        ],\n        \"categories\": [\n            {\"name\": str, \"count\": int}\n            # Top 5 most common categories\n        ]\n    },\n    \"entries\": [\n        {\n            \"job_name\": str,\n            \"company_name\": str,\n            \"company_url\": str,\n            \"tags_matched\": List[str],\n            \"tag_categories\": List[str],\n            \"remote\": bool,\n            \"country\": str,\n            # ... other job fields\n        }\n    ]\n}\n```\n\n### Important Notes\n\n- Only one search parameter can be used at a time in basic search\n- The `exact` parameter can only be used with `name` and `uses_product` searches\n- All searches are case-insensitive\n- Company URLs are automatically processed to remove common prefixes (http://, https://, www.)\n- Advanced search requires a field, operator, and value\n- The operator must be one of the supported operators listed above\n\n## Contributing\n\nFor development, install the package with development dependencies:\n\n```bash\npip install -e \".[dev]\"\n```\n\n### Building\n\n```bash\nbin/build\n```\n\n### Publishing\n\n```bash\nbin/publish\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "A python package for using the https://sourcestack.co/ API.",
    "version": "0.1.0",
    "project_urls": {
        "Homepage": "https://github.com/workflowing/sourcestack"
    },
    "split_keywords": [
        "sourcestack"
    ],
    "urls": [
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "2f046c1c6a21e843843df0af493ae2420605912c2aeab2eca877c564d9874b26",
                "md5": "744377fe9083c658441a4874fa6393f7",
                "sha256": "641a1e62a2943a1ae2d50172e2350d908e53ef2f770b824c06c367227f6bedbe"
            },
            "downloads": -1,
            "filename": "sourcestack-0.1.0-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "744377fe9083c658441a4874fa6393f7",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 8805,
            "upload_time": "2025-02-23T00:44:33",
            "upload_time_iso_8601": "2025-02-23T00:44:33.479723Z",
            "url": "https://files.pythonhosted.org/packages/2f/04/6c1c6a21e843843df0af493ae2420605912c2aeab2eca877c564d9874b26/sourcestack-0.1.0-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": null,
            "digests": {
                "blake2b_256": "81a0926476e9eb161ece04437df781a18ec18fa9ebb5fd6b8cc5d49e12509c9c",
                "md5": "f5ed409bf27146e846f2d4656e12b5e4",
                "sha256": "b7b868728bc83b3872e5ed4e9e3e4117b30a76efa12af5862a62d34a61e3157c"
            },
            "downloads": -1,
            "filename": "sourcestack-0.1.0.tar.gz",
            "has_sig": false,
            "md5_digest": "f5ed409bf27146e846f2d4656e12b5e4",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 10516,
            "upload_time": "2025-02-23T00:44:36",
            "upload_time_iso_8601": "2025-02-23T00:44:36.267284Z",
            "url": "https://files.pythonhosted.org/packages/81/a0/926476e9eb161ece04437df781a18ec18fa9ebb5fd6b8cc5d49e12509c9c/sourcestack-0.1.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2025-02-23 00:44:36",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "workflowing",
    "github_project": "sourcestack",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "circle": true,
    "lcname": "sourcestack"
}
        
Elapsed time: 1.02935s