brynq-sdk-recruitee 2.0.1__tar.gz → 2.1.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.
Files changed (20) hide show
  1. {brynq_sdk_recruitee-2.0.1 → brynq_sdk_recruitee-2.1.0}/PKG-INFO +3 -3
  2. brynq_sdk_recruitee-2.1.0/README.md +57 -0
  3. brynq_sdk_recruitee-2.1.0/brynq_sdk_recruitee/__init__.py +66 -0
  4. brynq_sdk_recruitee-2.1.0/brynq_sdk_recruitee/applicants.py +74 -0
  5. brynq_sdk_recruitee-2.1.0/brynq_sdk_recruitee/candidates.py +123 -0
  6. brynq_sdk_recruitee-2.1.0/brynq_sdk_recruitee/offers.py +191 -0
  7. brynq_sdk_recruitee-2.1.0/brynq_sdk_recruitee/organization.py +86 -0
  8. brynq_sdk_recruitee-2.1.0/brynq_sdk_recruitee/recruitee.py +85 -0
  9. brynq_sdk_recruitee-2.1.0/brynq_sdk_recruitee/vacancies.py +89 -0
  10. {brynq_sdk_recruitee-2.0.1 → brynq_sdk_recruitee-2.1.0}/brynq_sdk_recruitee.egg-info/PKG-INFO +3 -3
  11. {brynq_sdk_recruitee-2.0.1 → brynq_sdk_recruitee-2.1.0}/brynq_sdk_recruitee.egg-info/SOURCES.txt +6 -0
  12. brynq_sdk_recruitee-2.1.0/brynq_sdk_recruitee.egg-info/requires.txt +2 -0
  13. {brynq_sdk_recruitee-2.0.1 → brynq_sdk_recruitee-2.1.0}/setup.py +5 -7
  14. brynq_sdk_recruitee-2.0.1/brynq_sdk_recruitee/__init__.py +0 -1
  15. brynq_sdk_recruitee-2.0.1/brynq_sdk_recruitee/recruitee.py +0 -40
  16. brynq_sdk_recruitee-2.0.1/brynq_sdk_recruitee.egg-info/requires.txt +0 -4
  17. {brynq_sdk_recruitee-2.0.1 → brynq_sdk_recruitee-2.1.0}/brynq_sdk_recruitee.egg-info/dependency_links.txt +0 -0
  18. {brynq_sdk_recruitee-2.0.1 → brynq_sdk_recruitee-2.1.0}/brynq_sdk_recruitee.egg-info/not-zip-safe +0 -0
  19. {brynq_sdk_recruitee-2.0.1 → brynq_sdk_recruitee-2.1.0}/brynq_sdk_recruitee.egg-info/top_level.txt +0 -0
  20. {brynq_sdk_recruitee-2.0.1 → brynq_sdk_recruitee-2.1.0}/setup.cfg +0 -0
@@ -1,10 +1,10 @@
1
1
  Metadata-Version: 1.0
2
2
  Name: brynq_sdk_recruitee
3
- Version: 2.0.1
4
- Summary: Recruitee wrapper from BrynQ
3
+ Version: 2.1.0
4
+ Summary: Recruitee API SDK from BrynQ
5
5
  Home-page: UNKNOWN
6
6
  Author: BrynQ
7
7
  Author-email: support@brynq.com
8
8
  License: BrynQ License
9
- Description: Recruitee wrapper from BrynQ
9
+ Description: A Python SDK for interacting with the Recruitee API
10
10
  Platform: UNKNOWN
@@ -0,0 +1,57 @@
1
+ # Brynq Recruitee SDK
2
+
3
+ A Python SDK for interacting with the Recruitee API, providing a clean, modular interface to the Recruitee API with specialized modules for different aspects of the API.
4
+
5
+ ## Installation
6
+
7
+ ```bash
8
+ pip install brynq_sdk_recruitee
9
+ ```
10
+
11
+ ## Usage
12
+
13
+ ```python
14
+ from brynq_sdk_recruitee import Recruitee, Candidates, Offers, Organization, Vacancies, Applicants
15
+
16
+ # Initialize the main client
17
+ recruitee_client = Recruitee(label='your_label')
18
+
19
+ # Candidates operations
20
+ candidates = Candidates(recruitee_client)
21
+ response = candidates.get_candidates()
22
+ print(response.json())
23
+
24
+ # Offers operations
25
+ offers = Offers(recruitee_client)
26
+ response = offers.get_offers()
27
+ print(response.json())
28
+
29
+ # Organization operations
30
+ organization = Organization(recruitee_client)
31
+ response = organization.get_departments()
32
+ print(response.json())
33
+ ```
34
+
35
+ ## Credentials
36
+
37
+ The credentials for accessing the Recruitee API are securely stored and managed within the BrynQ platform. You authorize yourself in the system by providing necessary details like the token and company ID directly in BrynQ. The SDK will automatically retrieve these credentials when you initialize the client.
38
+
39
+ ## SDK Structure
40
+
41
+ The SDK is organized into several modules, each focused on a specific aspect of the Recruitee API:
42
+
43
+ - `recruitee.py`: Base client that provides low-level access to the Recruitee API
44
+ - `candidates.py`: Methods for managing candidates
45
+ - `offers.py`: Methods for managing offers/vacancies
46
+ - `organization.py`: Methods for retrieving organizational data (locations, departments, etc.)
47
+ - `vacancies.py`: Legacy methods for managing vacancies (delegates to Offers)
48
+ - `applicants.py`: Methods for managing applicants
49
+ - `rehire_check.py`: Methods for checking rehire status (delegates to Candidates)
50
+
51
+ ## Contributing
52
+
53
+ Contributions are welcome! Please feel free to submit a Pull Request.
54
+
55
+ ## License
56
+
57
+ This project is licensed under the BrynQ License.
@@ -0,0 +1,66 @@
1
+ """
2
+ Recruitee SDK for Python
3
+ ~~~~~~~~~~~~~~~~~~~~~~~
4
+
5
+ A Python SDK for interacting with the Recruitee API.
6
+
7
+ This SDK provides a clean, modular interface to the Recruitee API with specialized
8
+ modules for different aspects of the API (candidates, offers, organization, etc.).
9
+ """
10
+
11
+ from typing import Dict, Any
12
+ import requests
13
+ from .recruitee import Recruitee
14
+ from .candidates import Candidates
15
+ from .offers import Offers
16
+ from .organization import Organization
17
+ from .vacancies import Vacancies
18
+ from .applicants import Applicants
19
+
20
+ __version__ = '1.0.0'
21
+ __author__ = 'BrynQ'
22
+ __license__ = 'BrynQ License'
23
+
24
+ class RecruiteeError(Exception):
25
+ """Base exception for Recruitee SDK errors."""
26
+ pass
27
+
28
+ class RecruiteeAuthError(RecruiteeError):
29
+ """Raised when there are authentication issues."""
30
+ pass
31
+
32
+ class RecruiteeConfigError(RecruiteeError):
33
+ """Raised when there are configuration issues."""
34
+ pass
35
+
36
+ def validate_credentials(credentials: Dict[str, Any]) -> None:
37
+ """
38
+ Validate the credentials dictionary has required fields.
39
+
40
+ Args:
41
+ credentials: Dictionary containing credentials
42
+
43
+ Raises:
44
+ RecruiteeConfigError: If required credentials are missing
45
+ """
46
+ required_fields = ['company_id', 'token']
47
+ missing_fields = [field for field in required_fields if field not in credentials]
48
+
49
+ if missing_fields:
50
+ raise RecruiteeConfigError(
51
+ f"Missing required credentials: {', '.join(missing_fields)}"
52
+ )
53
+
54
+ # Export all classes
55
+ __all__ = [
56
+ 'Recruitee',
57
+ 'Candidates',
58
+ 'Offers',
59
+ 'Organization',
60
+ 'Vacancies',
61
+ 'Applicants',
62
+ 'RecruiteeError',
63
+ 'RecruiteeAuthError',
64
+ 'RecruiteeConfigError',
65
+ 'validate_credentials'
66
+ ]
@@ -0,0 +1,74 @@
1
+ """
2
+ Applicants API module for Recruitee.
3
+ """
4
+ from typing import Dict, Optional, List, Union
5
+ import requests
6
+
7
+
8
+ class Applicants:
9
+ """
10
+ Class for interacting with Recruitee applicants API.
11
+
12
+ This class provides methods for creating, updating, and managing applicants in Recruitee.
13
+ """
14
+ def __init__(self, recruitee_client):
15
+ """
16
+ Initialize the Applicants API client.
17
+
18
+ Args:
19
+ recruitee_client: An instance of the Recruitee client
20
+ """
21
+ self.client = recruitee_client
22
+
23
+ def get_applicants(self, filters: Optional[Dict] = None) -> requests.Response:
24
+ """
25
+ Get all applicants from Recruitee.
26
+
27
+ Args:
28
+ filters: Optional filters to apply
29
+
30
+ Returns:
31
+ Response from the API
32
+ """
33
+ return self.client.get_candidates(filters=filters)
34
+
35
+ def get_applicant(self, candidate_id: str) -> requests.Response:
36
+ """
37
+ Get a specific applicant from Recruitee.
38
+
39
+ Args:
40
+ candidate_id: The ID of the candidate
41
+
42
+ Returns:
43
+ Response from the API
44
+ """
45
+ return self.client.get_candidate(candidate_id=candidate_id)
46
+
47
+ def update_applicant_tags(self, candidate_ids: List[str], tags: List[str]) -> requests.Response:
48
+ """
49
+ Update tags for multiple applicants.
50
+
51
+ Args:
52
+ candidate_ids: List of candidate IDs
53
+ tags: List of tags to add
54
+
55
+ Returns:
56
+ Response from the API
57
+ """
58
+ data = {
59
+ "candidates": candidate_ids,
60
+ "tags": tags
61
+ }
62
+ return self.client.patch_bulk_candidates_tags(data=data)
63
+
64
+ def get_applicant_mailbox(self, candidate_id: str) -> requests.Response:
65
+ """
66
+ Get the mailbox for a specific applicant.
67
+
68
+ Args:
69
+ candidate_id: The ID of the candidate
70
+
71
+ Returns:
72
+ Response from the API
73
+ """
74
+ return self.client.get_mailbox(candidate_id=candidate_id)
@@ -0,0 +1,123 @@
1
+ """
2
+ Candidates API module for Recruitee.
3
+ """
4
+ from typing import Dict, Optional, List, Union
5
+ import requests
6
+
7
+
8
+ class Candidates:
9
+ """
10
+ Class for interacting with Recruitee candidates API.
11
+
12
+ This class provides methods for managing candidates in Recruitee.
13
+ """
14
+ def __init__(self, recruitee_client):
15
+ """
16
+ Initialize the Candidates API client.
17
+
18
+ Args:
19
+ recruitee_client: An instance of the Recruitee client
20
+ """
21
+ self.client = recruitee_client
22
+
23
+ def get_candidates(self, filters: Optional[Dict] = None) -> requests.Response:
24
+ """
25
+ Get all candidates from Recruitee.
26
+
27
+ Args:
28
+ filters: Optional filters to apply
29
+
30
+ Returns:
31
+ Response from the API
32
+ """
33
+ return self.client.get(
34
+ endpoint="candidates",
35
+ params=filters
36
+ )
37
+
38
+ def get_candidate(self, candidate_id: str) -> requests.Response:
39
+ """
40
+ Get a specific candidate from Recruitee.
41
+
42
+ Args:
43
+ candidate_id: The ID of the candidate
44
+
45
+ Returns:
46
+ Response from the API
47
+ """
48
+ return self.client.get(
49
+ endpoint=f"candidates/{candidate_id}"
50
+ )
51
+
52
+ def get_candidate_details(self, candidate_id: str) -> requests.Response:
53
+ """
54
+ Get detailed information about a specific candidate from Recruitee.
55
+ This is an alias for get_candidate for backward compatibility.
56
+
57
+ Args:
58
+ candidate_id: The ID of the candidate
59
+
60
+ Returns:
61
+ Response from the API
62
+ """
63
+ return self.get_candidate(candidate_id)
64
+
65
+ def patch_bulk_candidates_tags(self, data: Dict) -> requests.Response:
66
+ """
67
+ Update tags for multiple candidates.
68
+
69
+ Args:
70
+ data: Dictionary containing candidates and tags
71
+
72
+ Returns:
73
+ Response from the API
74
+ """
75
+ return self.client.patch(
76
+ endpoint="bulk/candidates/tags",
77
+ json=data
78
+ )
79
+
80
+ def update_candidate_tags(self, candidate_ids: List[str], tags: List[str]) -> requests.Response:
81
+ """
82
+ Update tags for multiple candidates.
83
+
84
+ Args:
85
+ candidate_ids: List of candidate IDs
86
+ tags: List of tags to add
87
+
88
+ Returns:
89
+ Response from the API
90
+ """
91
+ data = {
92
+ "candidates": candidate_ids,
93
+ "tags": tags
94
+ }
95
+ return self.patch_bulk_candidates_tags(data)
96
+
97
+ def update_rehire_tags(self, candidate_ids: List[str], tags: List[str]) -> requests.Response:
98
+ """
99
+ Update rehire-related tags for multiple candidates.
100
+ This is an alias for update_candidate_tags for backward compatibility.
101
+
102
+ Args:
103
+ candidate_ids: List of candidate IDs
104
+ tags: List of tags to add
105
+
106
+ Returns:
107
+ Response from the API
108
+ """
109
+ return self.update_candidate_tags(candidate_ids, tags)
110
+
111
+ def get_mailbox(self, candidate_id: str) -> requests.Response:
112
+ """
113
+ Get the mailbox for a specific candidate.
114
+
115
+ Args:
116
+ candidate_id: The ID of the candidate
117
+
118
+ Returns:
119
+ Response from the API
120
+ """
121
+ return self.client.get(
122
+ endpoint=f"mailbox/candidate/{candidate_id}"
123
+ )
@@ -0,0 +1,191 @@
1
+ """
2
+ Offers API module for Recruitee.
3
+ """
4
+ from typing import Dict, Optional, List, Union
5
+ import requests
6
+
7
+
8
+ class Offers:
9
+ """
10
+ Class for interacting with Recruitee offers API.
11
+
12
+ This class provides methods for managing offers in Recruitee.
13
+ """
14
+ def __init__(self, recruitee_client):
15
+ """
16
+ Initialize the Offers API client.
17
+
18
+ Args:
19
+ recruitee_client: An instance of the Recruitee client
20
+ """
21
+ self.client = recruitee_client
22
+
23
+ def get_offers(self, filters: Optional[Dict] = None) -> requests.Response:
24
+ """
25
+ Get all offers from Recruitee.
26
+
27
+ Args:
28
+ filters: Optional filters to apply
29
+
30
+ Returns:
31
+ Response from the API
32
+ """
33
+ return self.client.get(
34
+ endpoint="offers",
35
+ params=filters
36
+ )
37
+
38
+ def get_offer(self, offer_id: str, filters: Optional[Dict] = None) -> requests.Response:
39
+ """
40
+ Get a specific offer from Recruitee.
41
+
42
+ Args:
43
+ offer_id: The ID of the offer
44
+ filters: Optional filters to apply
45
+
46
+ Returns:
47
+ Response from the API
48
+ """
49
+ return self.client.get(
50
+ endpoint=f"offers/{offer_id}",
51
+ params=filters
52
+ )
53
+
54
+ def create_offer(self, title: str, description: str, **kwargs) -> requests.Response:
55
+ """
56
+ Create a new offer in Recruitee.
57
+
58
+ Args:
59
+ title: The title of the offer
60
+ description: The description of the offer
61
+ **kwargs: Additional offer attributes (recruiter_id, hiring_manager_id, etc.)
62
+
63
+ Returns:
64
+ Response from the API
65
+ """
66
+ data = {
67
+ 'offer': {
68
+ 'title': title,
69
+ 'description': description,
70
+ **kwargs
71
+ }
72
+ }
73
+ return self.post_offer(data)
74
+
75
+ def update_offer(self, offer_id: str, data: Dict) -> requests.Response:
76
+ """
77
+ Update an existing offer in Recruitee.
78
+
79
+ Args:
80
+ offer_id: The ID of the offer
81
+ data: The data to update
82
+
83
+ Returns:
84
+ Response from the API
85
+ """
86
+ return self.patch_offer(offer_id, data)
87
+
88
+ def post_offer(self, data: Dict) -> requests.Response:
89
+ """
90
+ Create a new offer in Recruitee.
91
+
92
+ Args:
93
+ data: The offer data
94
+
95
+ Returns:
96
+ Response from the API
97
+ """
98
+ return self.client.post(
99
+ endpoint="offers",
100
+ json=data
101
+ )
102
+
103
+ def patch_offer(self, offer_id: str, data: Dict) -> requests.Response:
104
+ """
105
+ Update an existing offer in Recruitee.
106
+
107
+ Args:
108
+ offer_id: The ID of the offer
109
+ data: The data to update
110
+
111
+ Returns:
112
+ Response from the API
113
+ """
114
+ return self.client.patch(
115
+ endpoint=f"offers/{offer_id}",
116
+ json=data
117
+ )
118
+
119
+ def delete_offer(self, offer_id: str) -> requests.Response:
120
+ """
121
+ Delete an offer from Recruitee.
122
+
123
+ Args:
124
+ offer_id: The ID of the offer
125
+
126
+ Returns:
127
+ Response from the API
128
+ """
129
+ return self.client.delete(
130
+ endpoint=f"offers/{offer_id}"
131
+ )
132
+
133
+ def patch_offer_slug(self, offer_id: str, data: Dict) -> requests.Response:
134
+ """
135
+ Update an offer's slug in Recruitee.
136
+
137
+ Args:
138
+ offer_id: The ID of the offer
139
+ data: The data to update
140
+
141
+ Returns:
142
+ Response from the API
143
+ """
144
+ return self.client.patch(
145
+ endpoint=f"offers/{offer_id}/change_slug",
146
+ json=data
147
+ )
148
+
149
+ def post_add_offer_tag(self, offer_id: str, data: Dict) -> requests.Response:
150
+ """
151
+ Add a tag to an offer.
152
+
153
+ Args:
154
+ offer_id: The ID of the offer
155
+ data: The tag data
156
+
157
+ Returns:
158
+ Response from the API
159
+ """
160
+ return self.client.post(
161
+ endpoint=f"offers/{offer_id}/offer_tags",
162
+ json=data
163
+ )
164
+
165
+ def patch_publish_offer(self, offer_id: str) -> requests.Response:
166
+ """
167
+ Publish an offer.
168
+
169
+ Args:
170
+ offer_id: The ID of the offer
171
+
172
+ Returns:
173
+ Response from the API
174
+ """
175
+ return self.client.patch(
176
+ endpoint=f"offers/{offer_id}/publish"
177
+ )
178
+
179
+ def patch_unpublish_offer(self, offer_id: str) -> requests.Response:
180
+ """
181
+ Unpublish an offer.
182
+
183
+ Args:
184
+ offer_id: The ID of the offer
185
+
186
+ Returns:
187
+ Response from the API
188
+ """
189
+ return self.client.patch(
190
+ endpoint=f"offers/{offer_id}/unpublish"
191
+ )
@@ -0,0 +1,86 @@
1
+ """
2
+ Organization API module for Recruitee.
3
+ """
4
+ from typing import Dict, Optional, List, Union
5
+ import requests
6
+
7
+
8
+ class Organization:
9
+ """
10
+ Class for interacting with Recruitee organization API.
11
+
12
+ This class provides methods for managing organization entities in Recruitee,
13
+ including locations, departments, and companies.
14
+ """
15
+ def __init__(self, recruitee_client):
16
+ """
17
+ Initialize the Organization API client.
18
+
19
+ Args:
20
+ recruitee_client: An instance of the Recruitee client
21
+ """
22
+ self.client = recruitee_client
23
+
24
+ # Locations methods
25
+ def get_locations(self, filters: Optional[Dict] = None) -> requests.Response:
26
+ """
27
+ Get locations data from Recruitee.
28
+
29
+ Args:
30
+ filters: Optional filters to apply
31
+
32
+ Returns:
33
+ Response from the API
34
+ """
35
+ return self.client.get(
36
+ endpoint="locations",
37
+ params=filters
38
+ )
39
+
40
+ # Departments methods
41
+ def get_departments(self, filters: Optional[Dict] = None) -> requests.Response:
42
+ """
43
+ Get departments data from Recruitee.
44
+
45
+ Args:
46
+ filters: Optional filters to apply
47
+
48
+ Returns:
49
+ Response from the API
50
+ """
51
+ return self.client.get(
52
+ endpoint="departments",
53
+ params=filters
54
+ )
55
+
56
+ # Companies methods
57
+ def get_companies(self, filters: Optional[Dict] = None) -> requests.Response:
58
+ """
59
+ Get companies data from Recruitee.
60
+
61
+ Args:
62
+ filters: Optional filters to apply
63
+
64
+ Returns:
65
+ Response from the API
66
+ """
67
+ return self.client.get(
68
+ endpoint="",
69
+ params=filters
70
+ )
71
+
72
+ # Memberships methods
73
+ def get_memberships(self, filters: Optional[Dict] = None) -> requests.Response:
74
+ """
75
+ Get memberships data from Recruitee.
76
+
77
+ Args:
78
+ filters: Optional filters to apply
79
+
80
+ Returns:
81
+ Response from the API
82
+ """
83
+ return self.client.get(
84
+ endpoint="memberships",
85
+ params=filters
86
+ )
@@ -0,0 +1,85 @@
1
+ """
2
+ Core Recruitee API client.
3
+ """
4
+
5
+ import requests
6
+ from typing import Union, List, Dict, Any, Optional
7
+ from brynq_sdk_brynq import BrynQ
8
+
9
+
10
+ class Recruitee(BrynQ):
11
+ """
12
+ Core client for interacting with the Recruitee API.
13
+
14
+ This is the base client that provides low-level access to the Recruitee API.
15
+ For specific API endpoints, use the specialized classes like Candidates, Offers, and Organization.
16
+
17
+ Args:
18
+ label: Label or list of labels for credentials
19
+ api_type: Type of API to use (default: "API")
20
+ """
21
+ def __init__(self, label: Union[str, List], api_type: str = "API"):
22
+ super().__init__()
23
+ credentials = self.get_system_credential(system='recruitee', label=label)
24
+ self.base_url = f'https://api.recruitee.com/c/{credentials["company_id"]}/'
25
+ self.headers = {
26
+ "Authorization": f"Bearer {credentials['token']}",
27
+ "Content-Type": "application/json"
28
+ }
29
+
30
+ def get(self, endpoint: str, params: Optional[Dict] = None) -> requests.Response:
31
+ """
32
+ Make a GET request to the Recruitee API.
33
+
34
+ Args:
35
+ endpoint: API endpoint to call
36
+ params: Optional parameters to include in the request
37
+
38
+ Returns:
39
+ Response from the API
40
+ """
41
+ url = f"{self.base_url}{endpoint}"
42
+ response = requests.get(url=url, headers=self.headers, params=params)
43
+ response.raise_for_status()
44
+ return response
45
+
46
+ def post(self, endpoint: str, json: Optional[Dict] = None) -> requests.Response:
47
+ """
48
+ Make a POST request to the Recruitee API.
49
+
50
+ Args:
51
+ endpoint: API endpoint to call
52
+ json: Optional JSON data to include in the request
53
+
54
+ Returns:
55
+ Response from the API
56
+ """
57
+ url = f"{self.base_url}{endpoint}"
58
+ return requests.post(url=url, headers=self.headers, json=json)
59
+
60
+ def patch(self, endpoint: str, json: Optional[Dict] = None) -> requests.Response:
61
+ """
62
+ Make a PATCH request to the Recruitee API.
63
+
64
+ Args:
65
+ endpoint: API endpoint to call
66
+ json: Optional JSON data to include in the request
67
+
68
+ Returns:
69
+ Response from the API
70
+ """
71
+ url = f"{self.base_url}{endpoint}"
72
+ return requests.patch(url=url, headers=self.headers, json=json)
73
+
74
+ def delete(self, endpoint: str) -> requests.Response:
75
+ """
76
+ Make a DELETE request to the Recruitee API.
77
+
78
+ Args:
79
+ endpoint: API endpoint to call
80
+
81
+ Returns:
82
+ Response from the API
83
+ """
84
+ url = f"{self.base_url}{endpoint}"
85
+ return requests.delete(url=url, headers=self.headers)
@@ -0,0 +1,89 @@
1
+ """
2
+ Vacancies API module for Recruitee.
3
+ """
4
+ from typing import Dict, Optional, List, Union
5
+ import requests
6
+
7
+ from .offers import Offers
8
+
9
+
10
+ class Vacancies:
11
+ """
12
+ Class for interacting with Recruitee vacancies API.
13
+
14
+ This class provides methods for creating, updating, and managing vacancies in Recruitee.
15
+ Operations are delegated to the Offers class for actual API interactions.
16
+ """
17
+ def __init__(self, recruitee_client):
18
+ """
19
+ Initialize the Vacancies API client.
20
+
21
+ Args:
22
+ recruitee_client: An instance of the Recruitee client
23
+ """
24
+ self.client = recruitee_client
25
+ self.offers = Offers(recruitee_client)
26
+
27
+ def create_vacancy(self, title: str, description: str, **kwargs) -> requests.Response:
28
+ """
29
+ Create a new vacancy in Recruitee.
30
+
31
+ Args:
32
+ title: The title of the vacancy
33
+ description: The description of the vacancy
34
+ **kwargs: Additional vacancy attributes (recruiter_id, hiring_manager_id, etc.)
35
+
36
+ Returns:
37
+ Response from the API
38
+ """
39
+ return self.offers.create_offer(title=title, description=description, **kwargs)
40
+
41
+ def update_vacancy(self, offer_id: str, data: Dict) -> requests.Response:
42
+ """
43
+ Update an existing vacancy in Recruitee.
44
+
45
+ Args:
46
+ offer_id: The ID of the offer
47
+ data: The data to update
48
+
49
+ Returns:
50
+ Response from the API
51
+ """
52
+ return self.offers.update_offer(offer_id=offer_id, data=data)
53
+
54
+ def delete_vacancy(self, offer_id: str) -> requests.Response:
55
+ """
56
+ Delete a vacancy from Recruitee.
57
+
58
+ Args:
59
+ offer_id: The ID of the offer
60
+
61
+ Returns:
62
+ Response from the API
63
+ """
64
+ return self.offers.delete_offer(offer_id=offer_id)
65
+
66
+ def get_vacancies(self, filters: Optional[Dict] = None) -> requests.Response:
67
+ """
68
+ Get all vacancies from Recruitee.
69
+
70
+ Args:
71
+ filters: Optional filters to apply
72
+
73
+ Returns:
74
+ Response from the API
75
+ """
76
+ return self.offers.get_offers(filters=filters)
77
+
78
+ def get_vacancy(self, offer_id: str, filters: Optional[Dict] = None) -> requests.Response:
79
+ """
80
+ Get a specific vacancy from Recruitee.
81
+
82
+ Args:
83
+ offer_id: The ID of the offer
84
+ filters: Optional filters to apply
85
+
86
+ Returns:
87
+ Response from the API
88
+ """
89
+ return self.offers.get_offer(offer_id=offer_id, filters=filters)
@@ -1,10 +1,10 @@
1
1
  Metadata-Version: 1.0
2
2
  Name: brynq-sdk-recruitee
3
- Version: 2.0.1
4
- Summary: Recruitee wrapper from BrynQ
3
+ Version: 2.1.0
4
+ Summary: Recruitee API SDK from BrynQ
5
5
  Home-page: UNKNOWN
6
6
  Author: BrynQ
7
7
  Author-email: support@brynq.com
8
8
  License: BrynQ License
9
- Description: Recruitee wrapper from BrynQ
9
+ Description: A Python SDK for interacting with the Recruitee API
10
10
  Platform: UNKNOWN
@@ -1,6 +1,12 @@
1
+ README.md
1
2
  setup.py
2
3
  brynq_sdk_recruitee/__init__.py
4
+ brynq_sdk_recruitee/applicants.py
5
+ brynq_sdk_recruitee/candidates.py
6
+ brynq_sdk_recruitee/offers.py
7
+ brynq_sdk_recruitee/organization.py
3
8
  brynq_sdk_recruitee/recruitee.py
9
+ brynq_sdk_recruitee/vacancies.py
4
10
  brynq_sdk_recruitee.egg-info/PKG-INFO
5
11
  brynq_sdk_recruitee.egg-info/SOURCES.txt
6
12
  brynq_sdk_recruitee.egg-info/dependency_links.txt
@@ -0,0 +1,2 @@
1
+ brynq-sdk-brynq>=2
2
+ requests<3.0.0,>=2.31.0
@@ -2,18 +2,16 @@ from setuptools import setup, find_namespace_packages
2
2
 
3
3
  setup(
4
4
  name='brynq_sdk_recruitee',
5
- version='2.0.1',
6
- description='Recruitee wrapper from BrynQ',
7
- long_description='Recruitee wrapper from BrynQ',
5
+ version='2.1.0',
6
+ description='Recruitee API SDK from BrynQ',
7
+ long_description='A Python SDK for interacting with the Recruitee API',
8
8
  author='BrynQ',
9
9
  author_email='support@brynq.com',
10
10
  packages=find_namespace_packages(include=['brynq_sdk*']),
11
11
  license='BrynQ License',
12
12
  install_requires=[
13
13
  'brynq-sdk-brynq>=2',
14
- 'requests>=2,<=3',
15
- 'pandas>=1,<3',
16
- 'pyarrow>=10,<=10'
14
+ 'requests>=2.31.0,<3.0.0'
17
15
  ],
18
- zip_safe=False,
16
+ zip_safe=False
19
17
  )
@@ -1 +0,0 @@
1
- from .recruitee import Recruitee
@@ -1,40 +0,0 @@
1
- import pandas as pd
2
- import requests
3
- from typing import Union, List
4
- from brynq_sdk_brynq import BrynQ
5
-
6
- class Recruitee(BrynQ):
7
- """
8
- This class is meant to be a simple wrapper around the Recruitee API. In order to start using it, authorize your application in BrynQ.
9
- You will need to provide a token for the authorization, which can be set up in BrynQ and referred to with a label.
10
- Besides, you need to add a company ID which can be provided by the customer.
11
- You can find the Recruitee API here: https://api.recruitee.com/docs/index.html
12
- """
13
- def __init__(self, label: Union[str, List], api_type: str = "API"):
14
- super().__init__()
15
- credentials = self.get_system_credential(system='recruitee', label=label)
16
- self.url = f'https://api.recruitee.com/c/{credentials["company_id"]}/'
17
- self.headers = {"Authorization": f"Bearer {credentials['token']}",
18
- "Content-Type": "application/json"}
19
-
20
- def get_candidates(self, filters: dict = None) -> pd.DataFrame:
21
- """
22
- This method retrieves the candidates data from Recruitee
23
- :param filters: A dict with filters. See the Recruitee API docs for more info: https://api.recruitee.com/docs/index.html#candidate.web.candidate-candidate.web.candidate-get
24
- :return:
25
- """
26
- response = requests.get(url=f"{self.url}candidates",
27
- headers=self.headers,
28
- params=filters)
29
- response.raise_for_status()
30
- return response
31
-
32
- def get_mailbox(self, candidate_id: str = None) -> pd.DataFrame:
33
- """
34
- This method retrieves the mailbox data from Recruitee.
35
- :return:
36
- """
37
- response = requests.get(url=f"{self.url}mailbox/candidate/{candidate_id}",
38
- headers=self.headers)
39
- response.raise_for_status()
40
- return response
@@ -1,4 +0,0 @@
1
- brynq-sdk-brynq>=2
2
- requests<=3,>=2
3
- pandas<3,>=1
4
- pyarrow<=10,>=10