Skip to content

Commit

Permalink
tweaksss
Browse files Browse the repository at this point in the history
  • Loading branch information
tomaslau committed Oct 30, 2024
1 parent ca588e4 commit 3e14c17
Show file tree
Hide file tree
Showing 14 changed files with 104 additions and 58 deletions.
16 changes: 8 additions & 8 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ __pycache__/
*$py.class
*.so
.Python
env/
build/
develop-eggs/
dist/
Expand All @@ -22,9 +23,6 @@ wheels/
*.egg

# Virtual Environment
.env
.venv
env/
venv/
ENV/

Expand All @@ -35,12 +33,14 @@ ENV/
*.swo

# Project specific
.cache/
logs/
data/
backups/
.env
config.json
data/*
!data/.gitkeep
logs/*
!logs/.gitkeep

# OS
# OS specific
.DS_Store
Thumbs.db

Expand Down
33 changes: 33 additions & 0 deletions config.example.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
{
"plugins": {
"serper": {
"max_results": 10,
"country": "us",
"language": "en"
},
"litellm": {
"default_model": "gpt-4",
"temperature": 0.7,
"max_tokens": 2000,
"retry_attempts": 3
},
"playwright": {
"headless": true,
"timeout": 30000,
"screenshot": false
},
"jina": {
"chunk_size": 1000,
"overlap": 200
}
},
"storage": {
"data_dir": "data",
"max_file_size_mb": 100
},
"logging": {
"level": "INFO",
"format": "%(asctime)s - %(name)s - %(levelname)s - %(message)s",
"date_format": "%Y-%m-%d %H:%M:%S"
}
}
11 changes: 0 additions & 11 deletions config.json

This file was deleted.

File renamed without changes.
File renamed without changes.
File renamed without changes.
27 changes: 0 additions & 27 deletions examples/__init__.py

This file was deleted.

2 changes: 1 addition & 1 deletion advanced.py → examples/advanced.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
import litellm
from litellm import completion
import openai
from pynions.plugins.stats import StatsPlugin
from pynions import StatsPlugin

# Load environment variables
load_dotenv()
Expand Down
File renamed without changes.
30 changes: 30 additions & 0 deletions pynions/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
"""
Pynions - A lean Python framework for marketers who code
Built for automating marketing tasks without the bloat.
"""

from pynions.core import Plugin, Workflow, WorkflowStep, Config, DataStore

# Import built-in plugins
from pynions.plugins.serper import SerperWebSearch
from pynions.plugins.litellm import LiteLLMPlugin
from pynions.plugins.playwright import PlaywrightPlugin
from pynions.plugins.jina import JinaPlugin
from pynions.plugins.stats import StatsPlugin

__version__ = "0.1.0"

__all__ = [
# Core components
"Plugin",
"Workflow",
"WorkflowStep",
"Config",
"DataStore",
# Built-in plugins
"SerperWebSearch",
"LiteLLMPlugin",
"PlaywrightPlugin",
"JinaPlugin",
"StatsPlugin",
]
File renamed without changes.
25 changes: 16 additions & 9 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
aiohttp==3.9.1
playwright==1.41.0
litellm==1.10.1
jina==3.15.1
python-dotenv==1.0.0
pydantic==2.5.2
pytest==7.4.3
pytest-asyncio==0.21.1
python-json-logger==2.0.7
# Core dependencies
aiohttp>=3.8.0
python-dotenv>=0.19.0
pydantic>=2.0.0

# Plugin-specific dependencies
litellm>=1.0.0
playwright>=1.39.0
httpx>=0.24.0

# Development dependencies
pytest>=7.0.0
pytest-asyncio>=0.21.0
pytest-cov>=4.1.0
black>=23.0.0
isort>=5.12.0
15 changes: 15 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
from setuptools import setup, find_packages

# Read requirements from requirements.txt
with open("requirements.txt") as f:
requirements = [
line.strip() for line in f if line.strip() and not line.startswith("#")
]

setup(
name="pynions",
version="0.1.0",
packages=find_packages(),
install_requires=requirements,
python_requires=">=3.8",
)
3 changes: 1 addition & 2 deletions workflows/example_workflow.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import asyncio
from pynions.core import Workflow, WorkflowStep, Config, DataStore
from pynions.plugins.serper import SerperWebSearch
from pynions import Workflow, WorkflowStep, Config, DataStore, SerperWebSearch


async def main():
Expand Down

0 comments on commit 3e14c17

Please sign in to comment.