Compare commits

...

7 Commits

8 changed files with 141 additions and 6 deletions
+3
View File
@@ -0,0 +1,3 @@
[submodule "agent/jaspersoft"]
path = agent/jaspersoft
url = https://gitea.1415243231.top/panda/jaspersoft-agent-learn.git
+35
View File
@@ -0,0 +1,35 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"id": "initial_id",
"metadata": {
"collapsed": true
},
"outputs": [],
"source": ""
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
+25
View File
@@ -0,0 +1,25 @@
from typing import Union
from fastapi import FastAPI
from pydantic import BaseModel
app = FastAPI()
class Item(BaseModel):
name: str
price: float
is_offer: Union[bool, None] = None
@app.get("/")
def read_root():
return {"Hello": "World"}
@app.get("/items/{item_id}")
def read_item(item_id: int, q: Union[str, None] = None):
return {"item_id": item_id, "q": q}
@app.put("/items/{item_id}")
def update_item(item_id: int, item: Item):
return {"item_name": item.price, "item_id": item_id}
+1
Submodule agent/jaspersoft added at 908431e25f
+1
View File
@@ -11,6 +11,7 @@
<sourceFolder url="file://$MODULE_DIR$/python爬虫/python爬虫练习/wangyizhaopin" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/python爬虫/python爬虫练习/wangyizhaopin" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/python爬虫/python爬虫练习/douban" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/python爬虫/python爬虫练习/douban" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/flask框架" isTestSource="false" /> <sourceFolder url="file://$MODULE_DIR$/flask框架" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/Fastapi" isTestSource="false" />
<excludeFolder url="file://$MODULE_DIR$/python爬虫/python爬虫练习/novel" /> <excludeFolder url="file://$MODULE_DIR$/python爬虫/python爬虫练习/novel" />
</content> </content>
<orderEntry type="jdk" jdkName="python" jdkType="Python SDK" /> <orderEntry type="jdk" jdkName="python" jdkType="Python SDK" />
@@ -0,0 +1,37 @@
{
"cells": [
{
"cell_type": "code",
"execution_count": null,
"id": "initial_id",
"metadata": {
"collapsed": true
},
"outputs": [],
"source": [
""
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 2
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython2",
"version": "2.7.6"
}
},
"nbformat": 4,
"nbformat_minor": 5
}
+1 -2
View File
@@ -1,6 +1,5 @@
import self as self
from selenium.webdriver import Chrome, Keys # 键盘操作
import time import time
from selenium.webdriver import Chrome, Keys # 键盘操作
from selenium.webdriver.chrome.options import Options from selenium.webdriver.chrome.options import Options
from selenium.webdriver.common.by import By from selenium.webdriver.common.by import By
+38 -4
View File
@@ -3,7 +3,7 @@ aiohttp==3.12.15
beautifulsoup4==4.13.5 beautifulsoup4==4.13.5
contractions==0.1.73 contractions==0.1.73
itemadapter==0.12.1 itemadapter==0.12.1
lxml==6.0.1 lxml>=5.0.0,<7.0.0
nltk==3.9.1 nltk==3.9.1
numpy==2.3.2 numpy==2.3.2
pyecharts==2.0.8 pyecharts==2.0.8
@@ -12,11 +12,45 @@ pymysql==1.1.2
pyspark==4.0.0 pyspark==4.0.0
pytest==8.4.1 pytest==8.4.1
redis==6.4.0 redis==6.4.0
Requests==2.32.5 requests==2.32.5
selenium==4.35.0 selenium==4.35.0
self==2020.12.3
setuptools==78.1.1 setuptools==78.1.1
six==1.17.0 six==1.17.0
spacy==3.8.7 spacy==3.8.7
Twisted==25.5.0 twisted==25.5.0
w3lib==2.3.1 w3lib==2.3.1
# ─────────────────────────────────────────────────────────────────────────────
# 项目自有代码新发现但原 requirements.txt 缺失(按实际 import 补齐)
# ─────────────────────────────────────────────────────────────────────────────
scrapy>=2.11.0 # 45 处 importpython爬虫/ 下 12+ 个 Scrapy 项目
flask>=3.0.0 # 9 处:flask 框架下的多个示例
fastapi>=0.110.0 # Fastapi/fastapi_1.py
pydantic>=2.5.0 # Fastapi/fastapi_1.py
flask-sqlalchemy>=3.1.0 # flask数据库迁移.py
flask-migrate>=4.0.0 # flask数据库迁移.py
alembic>=1.13.0 # flask数据库迁移/migrations/
sqlalchemy>=2.0.0 # flask数据库迁移/migrations/versions/
flask-wtf>=1.2.0 # flask-wtf.py
wtforms>=3.1.0 # flask-wtf.py
crawl4ai>=0.3.0 # python爬虫/crawl4ai/ 下 4 个示例
# ─────────────────────────────────────────────────────────────────────────────
# vendored scrapy-redis-0.9.1 子目录
# 该目录是 2019 年的老源码(含 cPickle 等 Py2 兼容代码),建议改用 pip 装
# 如保留 vendored,下方 6 个仍是其运行/测试依赖(保持原行不动)
# ─────────────────────────────────────────────────────────────────────────────
# scrapy-redis>=0.7.0 # 替换 vendored 时安装
# ─────────────────────────────────────────────────────────────────────────────
# agent/jaspersoft 子模块需要(按需取消注释安装)
# 当前子模块 concept.py 标准库即可跑;以下为接 LLM / RAG 时才需要
# ─────────────────────────────────────────────────────────────────────────────
# python-dotenv>=1.0.1 # 推荐配合子模块 config.py 使用(也可不用,子模块内置简易 .env 解析)
# openai>=1.30.0 # Step 03+ 接 OpenAI LLM
# anthropic>=0.30.0 # Step 03+ 接 Anthropic Claude
# chromadb>=0.5.0 # Step 05 RAG 向量库
# sentence-transformers>=2.7.0 # Step 05 embedding
# tiktoken>=0.7.0 # Step 04 token 估算(exercise_answer 中用到的可选库)
# pytest>=8.0.0 # 子模块练习自测