Skip to content

Commit caeee7a

Browse files
Merge pull request #135 from Navyasree-ulava/feature/python-sdk
Feature/python sdk
2 parents 4c26d34 + f70b190 commit caeee7a

18 files changed

Lines changed: 3218 additions & 1 deletion

‎README.md‎

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,13 @@ urBackend is an **Open-Source BaaS** built to eliminate the complexity of backen
5757
Go from zero to a live backend in **under 60 seconds**.
5858

5959
1. **Initialize**: Create a project on the [Dashboard](https://urbackend.bitbros.in).
60-
2. **Install**: `npm install @urbackend/sdk`
60+
2. **Install SDK**:
61+
- **Node.js / TS:** `npm install @urbackend/sdk`
62+
- **Python:** `pip install urbackend`
6163
3. **Model**: Visually define your collections and schemas.
6264
4. **Execute**: Push and pull data immediately using the SDK.
6365

66+
### TypeScript / Node.js
6467
```javascript
6568
import urBackend from '@urbackend/sdk';
6669

@@ -78,6 +81,24 @@ const product = await client.db.insert('products', {
7881
});
7982
```
8083

84+
### Python
85+
```python
86+
from urbackend import UrBackendClient
87+
88+
# Initialize with your API key
89+
client = UrBackendClient(api_key='YOUR_API_KEY')
90+
91+
# Read data (GET /api/data/products)
92+
products = client.db.get_all('products')
93+
94+
# Write data (POST /api/data/products)
95+
# requires sk_live_* key or RLS enabled
96+
product = client.db.insert('products', {
97+
'name': 'Widget',
98+
'price': 9.99
99+
})
100+
```
101+
81102
---
82103

83104
## 🔑 Key Behavior: `pk_live` vs `sk_live`

‎sdks/urbackend-python/.gitignore‎

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Python bytecode
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
*.pyo
6+
7+
# Distribution / packaging
8+
dist/
9+
build/
10+
*.egg-info/
11+
*.egg
12+
.eggs/
13+
MANIFEST
14+
15+
# Virtual environments
16+
.venv/
17+
venv/
18+
env/
19+
ENV/
20+
21+
# Pytest
22+
.pytest_cache/
23+
.coverage
24+
htmlcov/
25+
26+
# IDE
27+
.vscode/
28+
.idea/
29+
*.swp
30+
31+
# OS
32+
.DS_Store
33+
Thumbs.db

0 commit comments

Comments
 (0)