Skip to content

Commit 3c3b1a0

Browse files
author
Bruno
committed
Refactor README
1 parent 6312c65 commit 3c3b1a0

File tree

1 file changed

+23
-21
lines changed

1 file changed

+23
-21
lines changed

README.md

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,11 @@
1-
<!-- Define the README for the hubmigrate module with emojis -->
2-
# 🦆 hubmigrate
1+
# hubmigrate 🦆
32

4-
<!-- [![PyPI version](https://badge.fury.io/py/hubmigrate.svg)]
5-
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/hubmigrate.svg)]
6-
[![PyPI - License](https://img.shields.io/pypi/l/hubmigrate.svg)] -->
7-
8-
A Python library for migrating data to HubSpot.
3+
**hubmigrate** is a Python library that simplifies data migration to HubSpot.
94

105
## Installation
116

7+
You can install **hubmigrate** using pip:
8+
129
```bash
1310
pip install hubmigrate
1411
```
@@ -22,40 +19,45 @@ pip install hubmigrate
2219
3. Import the JSON data file to migrate.
2320
4. Call the `migrate_<object>` method on the `MigrationClient` instance with the object to migrate.
2421

25-
```python
26-
from hubmigrate import HubMigrate
22+
### Usage Example
2723

24+
```python
2825
from hubmigrate.client import MigrationClient
2926
import json
3027

31-
28+
# Create an instance of the MigrationClient class
3229
client = MigrationClient('config', 'hubspot')
3330

34-
3531
def post_company():
36-
# Create a test contact
32+
# Create a test company
3733
with open('hubmigrate/classes/sample_company.json') as f:
3834
company = json.load(f)
3935

40-
# Migrate the contact to HubSpot
36+
# Migrate the company to HubSpot
4137
response = client.migrate_company({'properties': company})
4238

43-
4439
post_company()
4540
```
4641

47-
<!-- ## Contributing
42+
## 🧰 Available Methods
4843

49-
### Setup
44+
### ☎️ Migrate Contacts
5045

51-
### Testing
46+
- `migrate_contact(data)`: Migrate a contact to HubSpot.
47+
- `update_contact(data, contact_id)`: Update a contact in HubSpot.
48+
- `delete_contact(contact_id)`: Delete a contact in HubSpot.
5249

53-
### Linting
50+
### 🏭 Migrate Companies
5451

55-
### Building
52+
- `migrate_company(data)`: Migrate a company to HubSpot.
53+
- `update_company(data, company_id)`: Update a company in HubSpot.
54+
- `delete_company(company_id)`: Delete a company in HubSpot.
5655

57-
### Publishing
56+
### 🔗 Associate Records
5857

59-
## License -->
58+
- `associate_records(object1_id, object2_id, definition_id)`: Associate two records in HubSpot by their IDs. This method allows you to create associations between different types of records.
59+
60+
🔐 Make sure to keep your `ACCESS_TOKEN` secure when using this library. Suggestion: store your `ACCESS_TOKEN` in a `.env` file and add it to your `.gitignore` file.
6061

6162
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
63+

0 commit comments

Comments
 (0)