
Security News
Browserslist-rs Gets Major Refactor, Cutting Binary Size by Over 1MB
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
A Python SDK for interacting with the Chakra API. This SDK provides seamless integration with pandas DataFrames for data querying and manipulation.
pip install chakra-py
https://github.com/user-attachments/assets/9f1c1ab8-cb87-42a1-8627-184617bbb7d7
from chakra_py import Chakra
import pandas as pd
# Initialize client
client = Chakra("YOUR_DB_SESSION_KEY")
# Query data (returns pandas DataFrame)
df = client.execute("SELECT * FROM my_table")
print(df.head())
# Push data to a new or existing table
data = pd.DataFrame({
"id": [1, 2, 3],
"name": ["Alice", "Bob", "Charlie"],
"score": [85.5, 92.0, 78.5]
})
client.push("students", data, create_if_missing=True)
Execute SQL queries and receive results as pandas DataFrames:
# Simple query
df = client.execute("SELECT * FROM table_name")
# Complex query with aggregations
df = client.execute("""
SELECT
category,
COUNT(*) as count,
AVG(value) as avg_value
FROM measurements
GROUP BY category
HAVING count > 10
ORDER BY avg_value DESC
""")
# Work with results using pandas
print(df.describe())
print(df.groupby('category').agg({'value': ['mean', 'std']}))
Push data from pandas DataFrames to tables with automatic schema handling:
# Create a sample DataFrame
df = pd.DataFrame({
'id': range(1, 1001),
'name': [f'User_{i}' for i in range(1, 1001)],
'score': np.random.normal(75, 15, 1000).round(2),
'active': np.random.choice([True, False], 1000)
})
# Create new table with inferred schema
client.push(
table_name="users",
data=df,
create_if_missing=True # Creates table if it doesn't exist
)
# Update existing table
new_users = pd.DataFrame({
'id': range(1001, 1101),
'name': [f'User_{i}' for i in range(1001, 1101)],
'score': np.random.normal(75, 15, 100).round(2),
'active': np.random.choice([True, False], 100)
})
client.push("users", new_users, create_if_missing=False)
The SDK automatically:
To contribute to the SDK:
git clone https://github.com/Chakra-Network/python-sdk.git
cd python-sdk
# Install Poetry if you haven't already
curl -sSL https://install.python-poetry.org | python3 -
# Install dependencies
poetry install
poetry run pytest
poetry build
The package is configured for easy PyPI publication:
pyproject.toml
poetry build
poetry publish
MIT License - see LICENSE file for details.
For support and questions, please open an issue in the GitHub repository.
FAQs
Interact with the Chakra API using Python + Pandas
We found that chakra-py demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Browserslist-rs now uses static data to reduce binary size by over 1MB, improving memory use and performance for Rust-based frontend tools.
Research
Security News
Eight new malicious Firefox extensions impersonate games, steal OAuth tokens, hijack sessions, and exploit browser permissions to spy on users.
Security News
The official Go SDK for the Model Context Protocol is in development, with a stable, production-ready release expected by August 2025.