Skip to content

Commit 25aae61

Browse files
committed
Project renaming for clarity
1 parent 14dcf98 commit 25aae61

19 files changed

+110
-56
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ jobs:
3333
- name: Run Tests
3434
env:
3535
PRIVATE_KEY: ${{ secrets.PRIVATE_KEY }}
36-
run: poetry run pytest --cov=jup_ag_sdk
36+
run: poetry run pytest --cov=jup_python_sdk

README-dev.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
## **Local Development**
2+
If you want to make changes to the SDK and test it locally:
3+
4+
1. In this project's directory, install the package in editable mode by running:
5+
```sh
6+
pip install -e .
7+
```
8+
9+
2. To use this library in another project while making changes to it, install the package from its local path in that project:
10+
```sh
11+
pip install -e /path/to/jup-ag-sdk
12+
```
13+
14+
Replace `/path/to/jup-ag-sdk` with the absolute or relative path to this project directory.
15+
16+
By installing in editable mode, any changes you make to the SDK will immediately reflect in your tests without needing to reinstall the package.

README-release.md

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
## **Making a New Release**
2+
To create and publish a new release of the package to PyPI:
3+
4+
1. **Update the Version:**
5+
- Update the version in your `pyproject.toml` file following [semantic versioning](https://semver.org/), e.g., `0.0.1``0.1.0` for a minor update.
6+
7+
2. **Commit the Changes:**
8+
- Commit and push the version update to the main branch:
9+
```sh
10+
git add pyproject.toml
11+
git commit -m "Bump version to vX.Y.Z"
12+
git push origin main
13+
```
14+
15+
3. **Create a Tag:**
16+
- Tag the commit with the new version:
17+
```sh
18+
git tag vX.Y.Z
19+
git push origin vX.Y.Z
20+
```
21+
22+
Replace `vX.Y.Z` with the actual version number.
23+
24+
4. **GitHub Actions Workflow:**
25+
- When the tag is pushed, the `release.yml` GitHub Actions workflow will automatically:
26+
- Build the package using Poetry.
27+
- Publish the package to PyPI.
28+
29+
5. **Confirm the Release:**
30+
- Check [PyPI](https://pypi.org/project/jup-ag-sdk/) to ensure the new version has been published successfully.

README.md

Lines changed: 50 additions & 42 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,69 @@
1-
# **Jup-Ag-SDK**
1+
# **Jup Python SDK**
22

33
A Python SDK for interacting with Jupiter Exchange APIs.
44

55
## **Installation**
6-
To install the SDK globally from PyPI, run:
7-
```sh
6+
7+
To install the SDK in your project, run:
8+
```
9+
sh
810
pip install jup-ag-sdk
911
```
12+
## **Quick Start**
1013

11-
## **Local Development**
12-
If you want to make changes to the SDK and test it locally:
13-
14-
1. In this project's directory, install the package in editable mode by running:
15-
```sh
16-
pip install -e .
17-
```
14+
Here's a basic example to help you get started with the Jup Python SDK:
15+
```
16+
python
17+
from dotenv import load_dotenv
1818
19-
2. To use this library in another project while making changes to it, install the package from its local path in that project:
20-
```sh
21-
pip install -e /path/to/jup-ag-sdk
22-
```
19+
from jup_python_sdk.clients.ultra_api_client import UltraApiClient
20+
from jup_python_sdk.models.ultra_api.ultra_order_request_model import (
21+
UltraOrderRequest,
22+
)
2323
24-
Replace `/path/to/jup-ag-sdk` with the absolute or relative path to this project directory.
24+
load_dotenv()
25+
client = UltraApiClient()
2526
26-
By installing in editable mode, any changes you make to the SDK will immediately reflect in your tests without needing to reinstall the package.
27+
order_request = UltraOrderRequest(
28+
input_mint="So11111111111111111111111111111111111111112", # WSOL
29+
output_mint="EPjFWdd5AufqSSqeM2qN1xzybapC8G4wEGGkZwyTDt1v", # USDC
30+
amount=10000000, # 0.01 WSOL
31+
taker=client._get_public_key(),
32+
)
2733
28-
## **Making a New Release**
29-
To create and publish a new release of the package to PyPI:
34+
try:
35+
client_response = client.order_and_execute(order_request)
36+
signature = str(client_response["signature"])
37+
38+
print("Order and Execute API Response:")
39+
print(f" - Transaction Signature: {signature}")
40+
print(f" - View on Solscan: https://solscan.io/tx/{signature}")
3041
31-
1. **Update the Version:**
32-
- Update the version in your `pyproject.toml` file following [semantic versioning](https://semver.org/), e.g., `0.0.1``0.1.0` for a minor update.
42+
except Exception as e:
43+
print("Error occurred while processing the order:", str(e))
44+
finally:
45+
client.close()
46+
```
3347

34-
2. **Commit the Changes:**
35-
- Commit and push the version update to the main branch:
36-
```sh
37-
git add pyproject.toml
38-
git commit -m "Bump version to vX.Y.Z"
39-
git push origin main
40-
```
48+
## **Setup Instructions**
4149

42-
3. **Create a Tag:**
43-
- Tag the commit with the new version:
44-
```sh
45-
git tag vX.Y.Z
46-
git push origin vX.Y.Z
47-
```
50+
Before using the SDK, please ensure you have completed the following steps:
4851

49-
Replace `vX.Y.Z` with the actual version number.
52+
1. **Environment Variables**:
53+
Set up your required environment variables.
54+
Example:
55+
```sh
56+
export PRIVATE_KEY=your_private_key_here
57+
```
5058

51-
4. **GitHub Actions Workflow:**
52-
- When the tag is pushed, the `release.yml` GitHub Actions workflow will automatically:
53-
- Build the package using Poetry.
54-
- Publish the package to PyPI.
59+
2. **Python Version**:
60+
Make sure you are using Python 3.9 or later.
5561

56-
5. **Confirm the Release:**
57-
- Check [PyPI](https://pypi.org/project/jup-ag-sdk/) to ensure the new version has been published successfully.
62+
3**Configuration**:
63+
TBD
5864

5965
## **Disclaimer**
60-
🚨 **This project is a work in progress and should not be used in production systems.**
61-
Expect breaking changes as the SDK evolves.
66+
67+
🚨 **This project is actively worked on.**
68+
While we don't expect breaking changes as the SDK evolves, we recommend you stay updated with the latest releases.
69+
Any important updates will be announced in the [Discord server](https://discord.gg/jup).

check_code.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
black jup_ag_sdk tests --line-length 79
2-
isort jup_ag_sdk tests
3-
flake8 jup_ag_sdk tests
4-
mypy jup_ag_sdk tests
1+
black jup_python_sdk tests --line-length 79
2+
isort jup_python_sdk tests
3+
flake8 jup_python_sdk tests
4+
mypy jup_python_sdk tests
55
pytest
File renamed without changes.
File renamed without changes.

jup_ag_sdk/clients/ultra_api_client.py renamed to jup_python_sdk/clients/ultra_api_client.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
from typing import Any, Dict, Optional
22

3-
from jup_ag_sdk.clients.jupiter_client import JupiterClient
4-
from jup_ag_sdk.models.ultra_api.ultra_execute_request_model import (
3+
from jup_python_sdk.clients.jupiter_client import JupiterClient
4+
from jup_python_sdk.models.ultra_api.ultra_execute_request_model import (
55
UltraExecuteRequest,
66
)
7-
from jup_ag_sdk.models.ultra_api.ultra_order_request_model import (
7+
from jup_python_sdk.models.ultra_api.ultra_order_request_model import (
88
UltraOrderRequest,
99
)
1010

File renamed without changes.

0 commit comments

Comments
 (0)