Name | neuronic JSON |
Version |
0.1.0
JSON |
| download |
home_page | None |
Summary | Neuronic: AI-powered data transformation and analysis tool. |
upload_time | 2024-11-20 00:03:33 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.8 |
license | None |
keywords |
data
transformation
ai
openai
gpt
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Neuronic ๐งช
Neuronic is a Python library that leverages AI to transform, analyze, and generate data in various formats. Think of it as your Swiss Army knife for data manipulation, powered by OpenAI's GPT models.
## ๐ Features
- **Data Transformation:** Convert between formats (CSV โ JSON โ XML)
- **Smart Analysis:** Get insights and answers about your data
- **Data Generation:** Create realistic test data on demand
- **Multiple Output Types:** Support for strings, numbers, JSON, lists, booleans, and Python structures
- **Context-Aware:** Use additional context for more accurate transformations
- **Flexible Input:** Accept virtually any data type as input
## ๐ฆ Installation
Install using pip:
pip install neuronic
## ๐ Configuration
Create a `.env` file in your project root:
OPENAI_API_KEY=your-openai-api-key-here
Or pass your API key directly:
neuronic = Neuronic(api_key="your-api-key-here")
## ๐ก Usage Examples
### 1. Data Transformation
Convert CSV data to JSON format:
from neuronic import Neuronic
neuronic = Neuronic()
customer_data = "John Doe, john@example.com, New York"
contact_card = neuronic.transform(
data=customer_data,
instruction="Convert this CSV data into a contact card format",
output_type="json",
example='{"name": "Jane Doe", "email": "jane@example.com", "location": "Los Angeles"}'
)
### 2. Data Analysis
Analyze sales data and get insights:
sales_data = [
{"month": "Jan", "revenue": 1000},
{"month": "Feb", "revenue": 1200},
{"month": "Mar", "revenue": 900}
]
analysis = neuronic.analyze(
data=sales_data,
question="What's the trend in revenue and which month performed best?"
)
### 3. Data Generation
Generate test data with specific requirements:
test_data = neuronic.generate(
spec="Create realistic user profiles with name, age, occupation, and favorite color",
n=3
)
### 4. Context-Aware Transformation
Generate documentation with specific context:
code_snippet = "print('hello world')"
documentation = neuronic.transform(
data=code_snippet,
instruction="Generate detailed documentation for this code",
output_type="json",
context={
"language": "Python",
"audience": "beginners",
"include_examples": True
}
)
### 5. Boolean Decision Making
Make simple yes/no decisions:
sentiment = neuronic.transform(
data="This product exceeded my expectations! Highly recommended!",
instruction="Is this review positive?",
output_type="bool"
)
### 6. Python Data Structures
Generate complex Python data structures:
data_structure = neuronic.transform(
data="Create a nested data structure representing a family tree",
instruction="Generate a Python dictionary with at least 3 generations",
output_type="python"
)
## ๐ฏ Use Cases
### Data Processing
- Format conversion (CSV โ JSON โ XML)
- Data cleaning and normalization
- Schema transformation
### Content Generation
- Test data creation
- Sample content generation
- Documentation automation
### Analysis
- Data summarization
- Trend analysis
- Pattern recognition
- Sentiment analysis
### Development Support
- Code documentation
- API response transformation
- Test data generation
- Data validation
## ๐ง API Reference
### Neuronic Class
Initialize the Neuronic class:
neuronic = Neuronic(api_key: str = None, model: str = "gpt-3.5-turbo")
### Methods
#### transform()
Transform data according to instructions:
result = neuronic.transform(
data: Any, # Input data
instruction: str, # What to do with the data
output_type: str = "string", # Desired output format
example: str = None, # Optional example
context: dict = None # Optional context
)
#### analyze()
Analyze data and get insights:
result = neuronic.analyze(
data: Any, # Data to analyze
question: str # Question about the data
)
#### generate()
Generate new data based on specifications:
result = neuronic.generate(
spec: str, # What to generate
n: int = 1 # Number of items
)
## ๐ Best Practices
1. **API Key Security**
- Use environment variables for API keys
- Never commit `.env` files to version control
2. **Performance**
- Cache frequently used transformations
- Batch similar operations when possible
3. **Error Handling**
- Always handle potential exceptions
- Validate output types match expected formats
## ๐ License
MIT License - feel free to use in your own projects!
## ๐ค Contributing
Contributions are welcome! Please feel free to submit a Pull Request.
Raw data
{
"_id": null,
"home_page": null,
"name": "neuronic",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "data, transformation, AI, OpenAI, GPT",
"author": null,
"author_email": "Nidal Alhariri <level09@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/ca/14/635acc1b4df8e664cccf1dcc9028ed92e5ed212c64c94e32131c0f419fb7/neuronic-0.1.0.tar.gz",
"platform": null,
"description": "# Neuronic \ud83e\uddea\n\nNeuronic is a Python library that leverages AI to transform, analyze, and generate data in various formats. Think of it as your Swiss Army knife for data manipulation, powered by OpenAI's GPT models.\n\n## \ud83d\ude80 Features\n\n- **Data Transformation:** Convert between formats (CSV \u2194 JSON \u2194 XML)\n- **Smart Analysis:** Get insights and answers about your data\n- **Data Generation:** Create realistic test data on demand\n- **Multiple Output Types:** Support for strings, numbers, JSON, lists, booleans, and Python structures\n- **Context-Aware:** Use additional context for more accurate transformations\n- **Flexible Input:** Accept virtually any data type as input\n\n## \ud83d\udce6 Installation\n\nInstall using pip:\n\n pip install neuronic\n\n## \ud83d\udd11 Configuration\n\nCreate a `.env` file in your project root:\n\n OPENAI_API_KEY=your-openai-api-key-here\n\nOr pass your API key directly:\n\n neuronic = Neuronic(api_key=\"your-api-key-here\")\n\n## \ud83d\udca1 Usage Examples\n\n### 1. Data Transformation\n\nConvert CSV data to JSON format:\n\n from neuronic import Neuronic\n \n neuronic = Neuronic()\n \n customer_data = \"John Doe, john@example.com, New York\"\n contact_card = neuronic.transform(\n data=customer_data,\n instruction=\"Convert this CSV data into a contact card format\",\n output_type=\"json\",\n example='{\"name\": \"Jane Doe\", \"email\": \"jane@example.com\", \"location\": \"Los Angeles\"}'\n )\n\n### 2. Data Analysis\n\nAnalyze sales data and get insights:\n\n sales_data = [\n {\"month\": \"Jan\", \"revenue\": 1000},\n {\"month\": \"Feb\", \"revenue\": 1200},\n {\"month\": \"Mar\", \"revenue\": 900}\n ]\n analysis = neuronic.analyze(\n data=sales_data,\n question=\"What's the trend in revenue and which month performed best?\"\n )\n\n### 3. Data Generation\n\nGenerate test data with specific requirements:\n\n test_data = neuronic.generate(\n spec=\"Create realistic user profiles with name, age, occupation, and favorite color\",\n n=3\n )\n\n### 4. Context-Aware Transformation\n\nGenerate documentation with specific context:\n\n code_snippet = \"print('hello world')\"\n documentation = neuronic.transform(\n data=code_snippet,\n instruction=\"Generate detailed documentation for this code\",\n output_type=\"json\",\n context={\n \"language\": \"Python\",\n \"audience\": \"beginners\",\n \"include_examples\": True\n }\n )\n\n### 5. Boolean Decision Making\n\nMake simple yes/no decisions:\n\n sentiment = neuronic.transform(\n data=\"This product exceeded my expectations! Highly recommended!\",\n instruction=\"Is this review positive?\",\n output_type=\"bool\"\n )\n\n### 6. Python Data Structures\n\nGenerate complex Python data structures:\n\n data_structure = neuronic.transform(\n data=\"Create a nested data structure representing a family tree\",\n instruction=\"Generate a Python dictionary with at least 3 generations\",\n output_type=\"python\"\n )\n\n## \ud83c\udfaf Use Cases\n\n### Data Processing\n- Format conversion (CSV \u2194 JSON \u2194 XML)\n- Data cleaning and normalization\n- Schema transformation\n\n### Content Generation\n- Test data creation\n- Sample content generation\n- Documentation automation\n\n### Analysis\n- Data summarization\n- Trend analysis\n- Pattern recognition\n- Sentiment analysis\n\n### Development Support\n- Code documentation\n- API response transformation\n- Test data generation\n- Data validation\n\n## \ud83d\udd27 API Reference\n\n### Neuronic Class\n\nInitialize the Neuronic class:\n\n neuronic = Neuronic(api_key: str = None, model: str = \"gpt-3.5-turbo\")\n\n### Methods\n\n#### transform()\n\nTransform data according to instructions:\n\n result = neuronic.transform(\n data: Any, # Input data\n instruction: str, # What to do with the data\n output_type: str = \"string\", # Desired output format\n example: str = None, # Optional example\n context: dict = None # Optional context\n )\n\n#### analyze()\n\nAnalyze data and get insights:\n\n result = neuronic.analyze(\n data: Any, # Data to analyze\n question: str # Question about the data\n )\n\n#### generate()\n\nGenerate new data based on specifications:\n\n result = neuronic.generate(\n spec: str, # What to generate\n n: int = 1 # Number of items\n )\n\n## \ud83d\udd12 Best Practices\n\n1. **API Key Security**\n - Use environment variables for API keys\n - Never commit `.env` files to version control\n\n2. **Performance**\n - Cache frequently used transformations\n - Batch similar operations when possible\n\n3. **Error Handling**\n - Always handle potential exceptions\n - Validate output types match expected formats\n\n## \ud83d\udcdd License\n\nMIT License - feel free to use in your own projects!\n\n## \ud83e\udd1d Contributing\n\nContributions are welcome! Please feel free to submit a Pull Request.",
"bugtrack_url": null,
"license": null,
"summary": "Neuronic: AI-powered data transformation and analysis tool.",
"version": "0.1.0",
"project_urls": {
"Documentation": "https://github.com/level09/neuronic#readme",
"Home": "https://github.com/level09/neuronic",
"Source": "https://github.com/level09/neuronic"
},
"split_keywords": [
"data",
" transformation",
" ai",
" openai",
" gpt"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "79c824a548a473c44203cbf476f0c185ffa4d70f203372686e0388fe270b3591",
"md5": "0ee38e6f33f2c935ea02f682d5907e19",
"sha256": "344db9b54ba199de05d1e99b6d87345986d78251f53dee5a27b321535e04bba6"
},
"downloads": -1,
"filename": "neuronic-0.1.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "0ee38e6f33f2c935ea02f682d5907e19",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 6212,
"upload_time": "2024-11-20T00:03:32",
"upload_time_iso_8601": "2024-11-20T00:03:32.073824Z",
"url": "https://files.pythonhosted.org/packages/79/c8/24a548a473c44203cbf476f0c185ffa4d70f203372686e0388fe270b3591/neuronic-0.1.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "ca14635acc1b4df8e664cccf1dcc9028ed92e5ed212c64c94e32131c0f419fb7",
"md5": "2ef10a9d0ce8be02c7e96a80c86ee87a",
"sha256": "2690e4b863d0042b9950ea346236f425d68d25f5e2d4070a705583081314d893"
},
"downloads": -1,
"filename": "neuronic-0.1.0.tar.gz",
"has_sig": false,
"md5_digest": "2ef10a9d0ce8be02c7e96a80c86ee87a",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 6128,
"upload_time": "2024-11-20T00:03:33",
"upload_time_iso_8601": "2024-11-20T00:03:33.837409Z",
"url": "https://files.pythonhosted.org/packages/ca/14/635acc1b4df8e664cccf1dcc9028ed92e5ed212c64c94e32131c0f419fb7/neuronic-0.1.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2024-11-20 00:03:33",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "level09",
"github_project": "neuronic#readme",
"travis_ci": false,
"coveralls": false,
"github_actions": false,
"lcname": "neuronic"
}