linkedin-jobs-api 2.0.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,9 @@
1
+ node_modules
2
+ dist
3
+ .env
4
+ coverage
5
+ __pycache__/
6
+ *.pyc
7
+ target/
8
+ .idea/
9
+ .vscode/
@@ -0,0 +1,43 @@
1
+ Metadata-Version: 2.4
2
+ Name: linkedin-jobs-api
3
+ Version: 2.0.0
4
+ Summary: Official Python SDK for LinkedIn Jobs API
5
+ Project-URL: Homepage, https://github.com/atharv01h/Linkedin-Jobs-Api
6
+ Project-URL: Repository, https://github.com/atharv01h/Linkedin-Jobs-Api
7
+ Project-URL: Bug Tracker, https://github.com/atharv01h/Linkedin-Jobs-Api/issues
8
+ Author-email: Atharv Hatwar <atharv@example.com>
9
+ License: MIT
10
+ Keywords: api,jobs,linkedin,scraper,sdk
11
+ Classifier: Development Status :: 5 - Production/Stable
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Operating System :: OS Independent
15
+ Classifier: Programming Language :: Python :: 3
16
+ Classifier: Programming Language :: Python :: 3.10
17
+ Classifier: Programming Language :: Python :: 3.11
18
+ Classifier: Programming Language :: Python :: 3.12
19
+ Requires-Python: >=3.10
20
+ Requires-Dist: requests>=2.28.0
21
+ Description-Content-Type: text/markdown
22
+
23
+ # LinkedIn Jobs API Python SDK
24
+
25
+ The official Python SDK for the LinkedIn Jobs API.
26
+
27
+ ## Installation
28
+
29
+ ```bash
30
+ pip install linkedin-jobs-api
31
+ ```
32
+
33
+ ## Usage
34
+
35
+ ```python
36
+ from linkedin_jobs_api import LinkedInJobsClient
37
+
38
+ client = LinkedInJobsClient()
39
+ jobs = client.search_jobs("Backend Developer", "Remote", "past_month", 1)
40
+ print(jobs)
41
+ ```
42
+
43
+ For more information, please visit the [Main GitHub Repository](https://github.com/atharv01h/Linkedin-Jobs-Api).
@@ -0,0 +1,21 @@
1
+ # LinkedIn Jobs API Python SDK
2
+
3
+ The official Python SDK for the LinkedIn Jobs API.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pip install linkedin-jobs-api
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```python
14
+ from linkedin_jobs_api import LinkedInJobsClient
15
+
16
+ client = LinkedInJobsClient()
17
+ jobs = client.search_jobs("Backend Developer", "Remote", "past_month", 1)
18
+ print(jobs)
19
+ ```
20
+
21
+ For more information, please visit the [Main GitHub Repository](https://github.com/atharv01h/Linkedin-Jobs-Api).
@@ -0,0 +1,3 @@
1
+ from .client import LinkedInJobsClient
2
+
3
+ __all__ = ["LinkedInJobsClient"]
@@ -0,0 +1,49 @@
1
+ import requests
2
+ import time
3
+ from typing import Optional, List, Dict, Any
4
+
5
+ class LinkedInJobsClient:
6
+ def __init__(self, base_url: str = "http://localhost:3000/api/v1", retries: int = 3, timeout: int = 10):
7
+ self.base_url = base_url
8
+ self.retries = retries
9
+ self.timeout = timeout
10
+ self.session = requests.Session()
11
+
12
+ def search_jobs(
13
+ self,
14
+ keywords: Optional[str] = None,
15
+ location: Optional[str] = None,
16
+ date_since_posted: Optional[str] = None,
17
+ page: int = 1
18
+ ) -> Dict[str, Any]:
19
+ """
20
+ Search for jobs on LinkedIn.
21
+ """
22
+ params = {"page": page}
23
+ if keywords:
24
+ params["keywords"] = keywords
25
+ if location:
26
+ params["location"] = location
27
+ if date_since_posted:
28
+ params["dateSincePosted"] = date_since_posted
29
+
30
+ url = f"{self.base_url}/jobs/search"
31
+
32
+ last_exception = None
33
+ for attempt in range(self.retries):
34
+ try:
35
+ response = self.session.get(url, params=params, timeout=self.timeout)
36
+ if response.status_code == 429:
37
+ # Rate limited, backoff and retry
38
+ time.sleep(2 ** attempt)
39
+ continue
40
+ response.raise_for_status()
41
+ return response.json()
42
+ except requests.exceptions.RequestException as e:
43
+ last_exception = e
44
+ # Do not retry on 4xx except 429
45
+ if isinstance(e, requests.exceptions.HTTPError) and 400 <= e.response.status_code < 500:
46
+ break
47
+ time.sleep(2 ** attempt)
48
+
49
+ raise RuntimeError(f"Request failed after {self.retries} attempts. Last error: {last_exception}")
@@ -0,0 +1,33 @@
1
+ [build-system]
2
+ requires = ["hatchling"]
3
+ build-backend = "hatchling.build"
4
+
5
+ [project.urls]
6
+ Homepage = "https://github.com/atharv01h/Linkedin-Jobs-Api"
7
+ Repository = "https://github.com/atharv01h/Linkedin-Jobs-Api"
8
+ "Bug Tracker" = "https://github.com/atharv01h/Linkedin-Jobs-Api/issues"
9
+
10
+ [project]
11
+ name = "linkedin-jobs-api"
12
+ version = "2.0.0"
13
+ description = "Official Python SDK for LinkedIn Jobs API"
14
+ readme = "README.md"
15
+ requires-python = ">=3.10"
16
+ license = { text = "MIT" }
17
+ authors = [
18
+ { name = "Atharv Hatwar", email = "atharv@example.com" },
19
+ ]
20
+ keywords = ["linkedin", "jobs", "api", "sdk", "scraper"]
21
+ classifiers = [
22
+ "Development Status :: 5 - Production/Stable",
23
+ "Intended Audience :: Developers",
24
+ "License :: OSI Approved :: MIT License",
25
+ "Operating System :: OS Independent",
26
+ "Programming Language :: Python :: 3",
27
+ "Programming Language :: Python :: 3.10",
28
+ "Programming Language :: Python :: 3.11",
29
+ "Programming Language :: Python :: 3.12",
30
+ ]
31
+ dependencies = [
32
+ "requests>=2.28.0",
33
+ ]