diff --git a/.docker/config.json b/.docker/config.json deleted file mode 100644 index e1ea444..0000000 --- a/.docker/config.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "experimental": "enabled" -} \ No newline at end of file diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml deleted file mode 100644 index b0e4b5d..0000000 --- a/.github/workflows/docker-build.yml +++ /dev/null @@ -1,33 +0,0 @@ -name: Build and Push Docker Image - -on: - push: - branches: - - main - -jobs: - build: - runs-on: ubuntu-latest - - steps: - - name: Checkout code - uses: actions/checkout@v2 - - - name: Set up Docker Buildx - uses: docker/setup-buildx-action@v1 - - - name: Login to GitHub Docker Registry - uses: docker/login-action@v1 - with: - registry: ghcr.io - username: ${{ github.actor }} - password: ${{ secrets.DOCKER_TOKEN }} - - - name: Build and Push Image - uses: docker/build-push-action@v2 - with: - context: . - file: ./Dockerfile - push: true - tags: ghcr.io/${{ github.repository_owner }}/jobspy:latest - platforms: linux/amd64,linux/arm64 diff --git a/.github/workflows/publish-to-pypi.yml b/.github/workflows/publish-to-pypi.yml new file mode 100644 index 0000000..2962f0c --- /dev/null +++ b/.github/workflows/publish-to-pypi.yml @@ -0,0 +1,33 @@ +name: Publish Python 🐍 distributions 📦 to PyPI +on: push + +jobs: + build-n-publish: + name: Build and publish Python 🐍 distributions 📦 to PyPI + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Set up Python + uses: actions/setup-python@v4 + with: + python-version: "3.10" + + - name: Install poetry + run: >- + python3 -m + pip install + poetry + --user + + - name: Build distribution 📦 + run: >- + python3 -m + poetry + build + + - name: Publish distribution 📦 to PyPI + if: startsWith(github.ref, 'refs/tags') + uses: pypa/gh-action-pypi-publish@release/v1 + with: + password: ${{ secrets.PYPI_API_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index b8a874a..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,89 +0,0 @@ -name: JobSpy API Tests - -on: [push, pull_request] - -jobs: - test_api: - runs-on: ubuntu-latest - - steps: - - name: Checkout repository - uses: actions/checkout@v2 - - - name: Set up Python 3.10 - uses: actions/setup-python@v2 - with: - python-version: '3.10' - - - name: Install dependencies - run: pip install -r requirements.txt - - - name: Install jq - run: sudo apt-get install jq - - - name: Start JobSpy FastAPI app - run: uvicorn main:app --host 0.0.0.0 --port 8000 & - - - name: Wait for server to be up - run: | - for i in {1..10}; do - curl -s http://0.0.0.0:8000/api/v1/jobs && break || sleep 1 - done - - - name: Check health - run: | - health_status=$(curl -L -s -o /dev/null -w "%{http_code}" http://0.0.0.0:8000/health) - - if [ "$health_status" != "200" ]; then - echo "Error: Health check failed with status code $health_status" - exit 1 - fi - -# not checking currently because of bad ip at Github's servers being blocked -# - name: Check HTTP status to POST /api/v1/jobs/ -# run: | -# response=$(curl -L -s -X 'POST' -H 'Content-Type: application/json' -d '{ -# "site_type": ["indeed", "linkedin"], -# "search_term": "software engineer", -# "location": "austin, tx", -# "distance": 10, -# "job_type": "fulltime", -# "results_wanted": 5 -# }' http://0.0.0.0:8000/api/v1/jobs -w "%{http_code}") -# -# status_code="${response: -3}" -# echo "Received status code: $status_code" -# -# if [ "$status_code" != "200" ]; then -# echo "Error: Expected status code 200, but got $status_code" -# exit 1 -# fi -# -# echo "${response::-3}" > response.json -# cat response.json -# -# - name: Check error field in response -# run: | -# global_error=$(jq '.error' response.json) -# indeed_error=$(jq '.indeed.error' response.json) -# linkedin_error=$(jq '.linkedin.error' response.json) -# -# if [[ "$indeed_error" != "null" || "$linkedin_error" != "null" ]]; then -# echo "Error found in response:" -# echo "Global Error: $global_error" -# echo "Indeed Error: $indeed_error" -# echo "LinkedIn Error: $linkedin_error" -# exit 1 -# fi -# -# - name: Verify returned_results in response -# run: | -# indeed_results=$(jq '.indeed.returned_results' response.json) -# linkedin_results=$(jq '.linkedin.returned_results' response.json) -# -# if [[ $indeed_results -ne 5 || $linkedin_results -ne 5 ]]; then -# echo "Mismatch in results_wanted and returned_results:" -# echo "Indeed: Expected 5, Got $indeed_results" -# echo "LinkedIn: Expected 5, Got $linkedin_results" -# exit 1 -# fi \ No newline at end of file diff --git a/.gitignore b/.gitignore index 125a75a..b845ce8 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,5 @@ **/__pycache__/ *.pyc .env -client_secret.json \ No newline at end of file +dist +/.ipynb_checkpoints/ \ No newline at end of file diff --git a/.vscode/launch.json b/.vscode/launch.json deleted file mode 100644 index c73ca12..0000000 --- a/.vscode/launch.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "version": "0.2.0", - "configurations": [ - { - "name": "Python: Module", - "type": "python", - "request": "launch", - "module": "uvicorn", - "args": ["main:app","--reload"] - } - - ] -} \ No newline at end of file diff --git a/Dockerfile b/Dockerfile deleted file mode 100644 index fcd66a6..0000000 --- a/Dockerfile +++ /dev/null @@ -1,15 +0,0 @@ -FROM python:3.10-slim - -WORKDIR /app - -COPY . /app - -RUN apt-get update && \ - apt-get install -y jq && \ - pip install --no-cache-dir -r requirements.txt - -EXPOSE 8000 - -ENV PORT=8000 - -CMD sh -c "uvicorn main:app --host 0.0.0.0 --port $PORT" \ No newline at end of file diff --git a/JobSpy_Demo.ipynb b/JobSpy_Demo.ipynb new file mode 100644 index 0000000..c58b85c --- /dev/null +++ b/JobSpy_Demo.ipynb @@ -0,0 +1,702 @@ +{ + "cells": [ + { + "cell_type": "code", + "execution_count": 2, + "id": "c3f21577-477d-451e-9914-5d67e8a89075", + "metadata": { + "scrolled": true + }, + "outputs": [ + { + "data": { + "text/html": [ + "
\n", + " | site | \n", + "title | \n", + "company_name | \n", + "city | \n", + "state | \n", + "job_type | \n", + "interval | \n", + "min_amount | \n", + "max_amount | \n", + "job_url | \n", + "description | \n", + "
---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", + "indeed | \n", + "Firmware Engineer | \n", + "Advanced Motion Controls | \n", + "Camarillo | \n", + "CA | \n", + "fulltime | \n", + "yearly | \n", + "145000 | \n", + "110000 | \n", + "https://www.indeed.com/viewjob?jk=a2e7077fdd3c... | \n", + "We are looking for an experienced Firmware Eng... | \n", + "
1 | \n", + "indeed | \n", + "Computer Engineer | \n", + "Honeywell | \n", + "\n", + " | None | \n", + "fulltime | \n", + "None | \n", + "None | \n", + "None | \n", + "https://www.indeed.com/viewjob?jk=5a1da623ee75... | \n", + "Join a team recognized for leadership, innovat... | \n", + "
2 | \n", + "indeed | \n", + "Software Engineer | \n", + "Splunk | \n", + "Remote | \n", + "None | \n", + "fulltime | \n", + "yearly | \n", + "159500 | \n", + "116000 | \n", + "https://www.indeed.com/viewjob?jk=155495ca3f46... | \n", + "A little about us. Splunk is the key to enterp... | \n", + "
3 | \n", + "indeed | \n", + "Development Operations Engineer | \n", + "Stratacache | \n", + "Dayton | \n", + "OH | \n", + "fulltime | \n", + "yearly | \n", + "90000 | \n", + "83573 | \n", + "https://www.indeed.com/viewjob?jk=77cf3540c06e... | \n", + "Stratacache, Inc. delivers in-store retail exp... | \n", + "
4 | \n", + "indeed | \n", + "Computer Engineer | \n", + "Honeywell | \n", + "\n", + " | None | \n", + "fulltime | \n", + "None | \n", + "None | \n", + "None | \n", + "https://www.indeed.com/viewjob?jk=7fadbb7c936f... | \n", + "Join a team recognized for leadership, innovat... | \n", + "
5 | \n", + "indeed | \n", + "Full Stack Developer | \n", + "Reinventing Geospatial, Inc. (RGi) | \n", + "Herndon | \n", + "VA | \n", + "fulltime | \n", + "None | \n", + "None | \n", + "None | \n", + "https://www.indeed.com/viewjob?jk=11b2b5b0dd44... | \n", + "Job Highlights As a Full Stack Software Engine... | \n", + "
6 | \n", + "indeed | \n", + "Software Engineer | \n", + "Workiva | \n", + "Remote | \n", + "None | \n", + "None | \n", + "yearly | \n", + "134000 | \n", + "79000 | \n", + "https://www.indeed.com/viewjob?jk=ec3ab6eb9253... | \n", + "Are you ready to embark on an exciting journey... | \n", + "
7 | \n", + "indeed | \n", + "Senior Software Engineer | \n", + "SciTec | \n", + "Boulder | \n", + "CO | \n", + "fulltime | \n", + "yearly | \n", + "164000 | \n", + "93000 | \n", + "https://www.indeed.com/viewjob?jk=781e4cf0cf6d... | \n", + "SciTec has been awarded multiple government co... | \n", + "
8 | \n", + "indeed | \n", + "Software Engineer | \n", + "Microsoft | \n", + "\n", + " | None | \n", + "fulltime | \n", + "yearly | \n", + "182600 | \n", + "94300 | \n", + "https://www.indeed.com/viewjob?jk=21e05b9e9d96... | \n", + "At Microsoft we are seeking people who have a ... | \n", + "
9 | \n", + "indeed | \n", + "Software Engineer | \n", + "Avalon Healthcare Solutions | \n", + "Remote | \n", + "None | \n", + "None | \n", + "None | \n", + "None | \n", + "None | \n", + "https://www.indeed.com/viewjob?jk=da35b9bb74a0... | \n", + "Avalon Healthcare Solutions, headquartered in ... | \n", + "
10 | \n", + "Software Engineer | \n", + "Fieldguide | \n", + "San Francisco | \n", + "CA | \n", + "fulltime | \n", + "yearly | \n", + "None | \n", + "None | \n", + "https://www.linkedin.com/jobs/view/3696158160 | \n", + "About us:Fieldguide is establishing a new stat... | \n", + "|
11 | \n", + "Software Engineer - Early Career | \n", + "Lockheed Martin | \n", + "Sunnyvale | \n", + "CA | \n", + "fulltime | \n", + "yearly | \n", + "None | \n", + "None | \n", + "https://www.linkedin.com/jobs/view/3693012711 | \n", + "Description:By bringing together people that u... | \n", + "|
12 | \n", + "Software Engineer - Early Career | \n", + "Lockheed Martin | \n", + "Edwards | \n", + "CA | \n", + "fulltime | \n", + "yearly | \n", + "None | \n", + "None | \n", + "https://www.linkedin.com/jobs/view/3700669785 | \n", + "Description:By bringing together people that u... | \n", + "|
13 | \n", + "Software Engineer - Early Career | \n", + "Lockheed Martin | \n", + "Fort Worth | \n", + "TX | \n", + "fulltime | \n", + "yearly | \n", + "None | \n", + "None | \n", + "https://www.linkedin.com/jobs/view/3701775201 | \n", + "Description:By bringing together people that u... | \n", + "|
14 | \n", + "Software Engineer - Early Career | \n", + "Lockheed Martin | \n", + "Fort Worth | \n", + "TX | \n", + "fulltime | \n", + "yearly | \n", + "None | \n", + "None | \n", + "https://www.linkedin.com/jobs/view/3701772329 | \n", + "Description:By bringing together people that u... | \n", + "|
15 | \n", + "Software Engineer - Early Career | \n", + "Lockheed Martin | \n", + "Fort Worth | \n", + "TX | \n", + "fulltime | \n", + "yearly | \n", + "None | \n", + "None | \n", + "https://www.linkedin.com/jobs/view/3701769637 | \n", + "Description:By bringing together people that u... | \n", + "|
16 | \n", + "Software Engineer | \n", + "SpiderOak | \n", + "Austin | \n", + "TX | \n", + "fulltime | \n", + "yearly | \n", + "None | \n", + "None | \n", + "https://www.linkedin.com/jobs/view/3707174719 | \n", + "We're only as strong as our weakest link.In th... | \n", + "|
17 | \n", + "Software Engineer - Early Career | \n", + "Lockheed Martin | \n", + "Fort Worth | \n", + "TX | \n", + "fulltime | \n", + "yearly | \n", + "None | \n", + "None | \n", + "https://www.linkedin.com/jobs/view/3701770659 | \n", + "Description:By bringing together people that u... | \n", + "|
18 | \n", + "Full-Stack Software Engineer | \n", + "Rain | \n", + "New York | \n", + "NY | \n", + "fulltime | \n", + "yearly | \n", + "None | \n", + "None | \n", + "https://www.linkedin.com/jobs/view/3696158877 | \n", + "Rain’s mission is to create the fastest and ea... | \n", + "|
19 | \n", + "Software Engineer | \n", + "Nike | \n", + "Portland | \n", + "OR | \n", + "contract | \n", + "yearly | \n", + "None | \n", + "None | \n", + "https://www.linkedin.com/jobs/view/3693340247 | \n", + "Work options: FlexibleWe consider remote, on-p... | \n", + "|
20 | \n", + "zip_recruiter | \n", + "(USA) Software Engineer III - Prototype Engine... | \n", + "Walmart | \n", + "Dallas | \n", + "TX | \n", + "None | \n", + "None | \n", + "None | \n", + "None | \n", + "https://click.appcast.io/track/hcgsw4k?cs=ngp&... | \n", + "We are currently seeking a highly skilled and ... | \n", + "
21 | \n", + "zip_recruiter | \n", + "Software Engineer - New Grad | \n", + "ZipRecruiter | \n", + "Santa Monica | \n", + "CA | \n", + "fulltime | \n", + "yearly | \n", + "130000 | \n", + "150000 | \n", + "https://www.ziprecruiter.com/jobs/ziprecruiter... | \n", + "We offer a hybrid work environment. Most US-ba... | \n", + "
22 | \n", + "zip_recruiter | \n", + "Software Developer | \n", + "Robert Half | \n", + "Corpus Christi | \n", + "TX | \n", + "fulltime | \n", + "yearly | \n", + "105000 | \n", + "115000 | \n", + "https://www.ziprecruiter.com/jobs/robert-half-... | \n", + "Robert Half has an opening for a Software Deve... | \n", + "
23 | \n", + "zip_recruiter | \n", + "Software Engineer | \n", + "Advantage Technical | \n", + "Ontario | \n", + "CA | \n", + "fulltime | \n", + "yearly | \n", + "100000 | \n", + "150000 | \n", + "https://www.ziprecruiter.com/jobs/advantage-te... | \n", + "New career opportunity available with major Ma... | \n", + "
24 | \n", + "zip_recruiter | \n", + "Software Developer | \n", + "Robert Half | \n", + "Tucson | \n", + "AZ | \n", + "temporary | \n", + "hourly | \n", + "47 | \n", + "55 | \n", + "https://www.ziprecruiter.com/jobs/robert-half-... | \n", + "Robert Half is accepting inquiries for a SQL S... | \n", + "
25 | \n", + "zip_recruiter | \n", + "Full Stack Software Engineer | \n", + "ZipRecruiter | \n", + "Phoenix | \n", + "AZ | \n", + "fulltime | \n", + "yearly | \n", + "105000 | \n", + "145000 | \n", + "https://www.ziprecruiter.com/jobs/ziprecruiter... | \n", + "We offer a hybrid work environment. Most US-ba... | \n", + "
26 | \n", + "zip_recruiter | \n", + "Software Developer IV | \n", + "Kforce Inc. | \n", + "Mountain View | \n", + "CA | \n", + "contract | \n", + "hourly | \n", + "55 | \n", + "75 | \n", + "https://www.kforce.com/Jobs/job.aspx?job=1696~... | \n", + "Kforce has a client that is seeking a Software... | \n", + "
27 | \n", + "zip_recruiter | \n", + "Software Developer | Onsite | Omaha, NE - Omaha | \n", + "OneStaff Medical | \n", + "Omaha | \n", + "NE | \n", + "fulltime | \n", + "yearly | \n", + "60000 | \n", + "110000 | \n", + "https://www.ziprecruiter.com/jobs/onestaff-med... | \n", + "Company Description: We are looking for a well... | \n", + "
28 | \n", + "zip_recruiter | \n", + "Senior Software Engineer | \n", + "RightStaff, Inc. | \n", + "Dallas | \n", + "TX | \n", + "fulltime | \n", + "yearly | \n", + "120000 | \n", + "180000 | \n", + "https://www.ziprecruiter.com/jobs/rightstaff-i... | \n", + "Job Description:We are seeking a talented and ... | \n", + "
29 | \n", + "zip_recruiter | \n", + "Software Developer - .Net Core - 12886 | \n", + "Walker Elliott | \n", + "Dallas | \n", + "TX | \n", + "fulltime | \n", + "yearly | \n", + "105000 | \n", + "130000 | \n", + "https://www.ziprecruiter.com/jobs/walker-ellio... | \n", + "Our highly successful DFW based client has bee... | \n", + "