labarchive-integration by davila7/claude-code-templates
npx skills add https://github.com/davila7/claude-code-templates --skill labarchive-integrationLabArchives 是一个用于研究文档和数据管理的电子实验室笔记本平台。可通过 REST API 以编程方式访问笔记本、管理条目和附件、生成报告,并与第三方工具集成。
在以下情况下应使用此技能:
为 LabArchives API 集成设置 API 访问凭据和区域端点。
先决条件:
配置设置:
使用 scripts/setup_config.py 脚本创建配置文件:
python3 scripts/setup_config.py
这将创建一个具有以下结构的 config.yaml 文件:
api_url: https://api.labarchives.com/api # 或区域端点
access_key_id: YOUR_ACCESS_KEY_ID
access_password: YOUR_ACCESS_PASSWORD
广告位招租
在这里展示您的产品或服务
触达数万 AI 开发者,精准高效
区域 API 端点:
https://api.labarchives.com/apihttps://auapi.labarchives.com/apihttps://ukapi.labarchives.com/api有关详细的身份验证说明和故障排除,请参阅 references/authentication_guide.md。
获取后续 API 操作所需的用户 ID(UID)和访问信息。
工作流程:
users/user_access_info API 方法users/user_info_via_id 检索详细的用户信息使用 Python 包装器的示例:
from labarchivespy.client import Client
# 初始化客户端
client = Client(api_url, access_key_id, access_password)
# 获取用户访问信息
login_params = {'login_or_email': user_email, 'password': auth_token}
response = client.make_call('users', 'user_access_info', params=login_params)
# 从响应中提取 UID
import xml.etree.ElementTree as ET
uid = ET.fromstring(response.content)[0].text
# 获取详细的用户信息
params = {'uid': uid}
user_info = client.make_call('users', 'user_info_via_id', params=params)
管理笔记本访问、备份和元数据检索。
关键操作:
笔记本备份示例:
使用 scripts/notebook_operations.py 脚本:
# 备份包含附件(默认,创建 7z 存档)
python3 scripts/notebook_operations.py backup --uid USER_ID --nbid NOTEBOOK_ID
# 备份不包含附件,JSON 格式
python3 scripts/notebook_operations.py backup --uid USER_ID --nbid NOTEBOOK_ID --json --no-attachments
API 端点格式:
https://<api_url>/notebooks/notebook_backup?uid=<UID>&nbid=<NOTEBOOK_ID>&json=true&no_attachments=false
有关全面的 API 方法文档,请参阅 references/api_reference.md。
创建、修改和管理笔记本条目及文件附件。
条目操作:
附件工作流程:
使用 scripts/entry_operations.py 脚本:
# 将附件上传到条目
python3 scripts/entry_operations.py upload --uid USER_ID --nbid NOTEBOOK_ID --entry-id ENTRY_ID --file /path/to/file.pdf
# 创建包含文本内容的新条目
python3 scripts/entry_operations.py create --uid USER_ID --nbid NOTEBOOK_ID --title "Experiment Results" --content "Results from today's experiment..."
支持的文件类型:
生成关于笔记本使用情况、活动和合规性的机构报告(企业版功能)。
可用报告:
报告生成:
# 生成详细使用报告
response = client.make_call('site_reports', 'detailed_usage_report',
params={'start_date': '2025-01-01', 'end_date': '2025-10-20'})
LabArchives 与众多科学软件平台集成。此技能提供了以编程方式利用这些集成的指导。
支持的集成:
OAuth 身份验证: LabArchives 现在对所有新集成使用 OAuth。旧版集成可能使用 API 密钥身份验证。
有关详细的集成设置说明和用例,请参阅 references/integrations.md。
# 完整备份脚本
python3 scripts/notebook_operations.py backup-all --email user@example.edu --password AUTH_TOKEN
安装 labarchives-py 包装器以简化 API 访问:
git clone https://github.com/mcmero/labarchives-py
cd labarchives-py
uv pip install .
或者,对于自定义实现,可以通过 Python 的 requests 库使用直接 HTTP 请求。
常见问题:
如需额外支持,请联系 LabArchives:support@labarchives.com。
此技能包含捆绑的资源以支持 LabArchives API 集成:
setup_config.py:用于 API 凭据的交互式配置文件生成器notebook_operations.py:用于列出、备份和管理笔记本的实用程序entry_operations.py:用于创建条目和上传附件的工具api_reference.md:包含参数和示例的全面 API 端点文档authentication_guide.md:详细的身份验证设置和配置说明integrations.md:第三方集成设置指南和用例每周安装次数
116
代码仓库
GitHub 星标数
22.6K
首次出现
2026 年 1 月 21 日
安全审计
安装于
claude-code101
opencode92
cursor89
gemini-cli88
antigravity82
codex77
LabArchives is an electronic lab notebook platform for research documentation and data management. Access notebooks, manage entries and attachments, generate reports, and integrate with third-party tools programmatically via REST API.
This skill should be used when:
Set up API access credentials and regional endpoints for LabArchives API integration.
Prerequisites:
Configuration setup:
Use the scripts/setup_config.py script to create a configuration file:
python3 scripts/setup_config.py
This creates a config.yaml file with the following structure:
api_url: https://api.labarchives.com/api # or regional endpoint
access_key_id: YOUR_ACCESS_KEY_ID
access_password: YOUR_ACCESS_PASSWORD
Regional API endpoints:
https://api.labarchives.com/apihttps://auapi.labarchives.com/apihttps://ukapi.labarchives.com/apiFor detailed authentication instructions and troubleshooting, refer to references/authentication_guide.md.
Obtain user ID (UID) and access information required for subsequent API operations.
Workflow:
users/user_access_info API method with login credentialsusers/user_info_via_idExample using Python wrapper:
from labarchivespy.client import Client
# Initialize client
client = Client(api_url, access_key_id, access_password)
# Get user access info
login_params = {'login_or_email': user_email, 'password': auth_token}
response = client.make_call('users', 'user_access_info', params=login_params)
# Extract UID from response
import xml.etree.ElementTree as ET
uid = ET.fromstring(response.content)[0].text
# Get detailed user info
params = {'uid': uid}
user_info = client.make_call('users', 'user_info_via_id', params=params)
Manage notebook access, backup, and metadata retrieval.
Key operations:
Notebook backup example:
Use the scripts/notebook_operations.py script:
# Backup with attachments (default, creates 7z archive)
python3 scripts/notebook_operations.py backup --uid USER_ID --nbid NOTEBOOK_ID
# Backup without attachments, JSON format
python3 scripts/notebook_operations.py backup --uid USER_ID --nbid NOTEBOOK_ID --json --no-attachments
API endpoint format:
https://<api_url>/notebooks/notebook_backup?uid=<UID>&nbid=<NOTEBOOK_ID>&json=true&no_attachments=false
For comprehensive API method documentation, refer to references/api_reference.md.
Create, modify, and manage notebook entries and file attachments.
Entry operations:
Attachment workflow:
Use the scripts/entry_operations.py script:
# Upload attachment to an entry
python3 scripts/entry_operations.py upload --uid USER_ID --nbid NOTEBOOK_ID --entry-id ENTRY_ID --file /path/to/file.pdf
# Create a new entry with text content
python3 scripts/entry_operations.py create --uid USER_ID --nbid NOTEBOOK_ID --title "Experiment Results" --content "Results from today's experiment..."
Supported file types:
Generate institutional reports on notebook usage, activity, and compliance (Enterprise feature).
Available reports:
Report generation:
# Generate detailed usage report
response = client.make_call('site_reports', 'detailed_usage_report',
params={'start_date': '2025-01-01', 'end_date': '2025-10-20'})
LabArchives integrates with numerous scientific software platforms. This skill provides guidance on leveraging these integrations programmatically.
Supported integrations:
OAuth authentication: LabArchives now uses OAuth for all new integrations. Legacy integrations may use API key authentication.
For detailed integration setup instructions and use cases, refer to references/integrations.md.
# Complete backup script
python3 scripts/notebook_operations.py backup-all --email user@example.edu --password AUTH_TOKEN
Install the labarchives-py wrapper for simplified API access:
git clone https://github.com/mcmero/labarchives-py
cd labarchives-py
uv pip install .
Alternatively, use direct HTTP requests via Python's requests library for custom implementations.
Common issues:
For additional support, contact LabArchives at support@labarchives.com.
This skill includes bundled resources to support LabArchives API integration:
setup_config.py: Interactive configuration file generator for API credentialsnotebook_operations.py: Utilities for listing, backing up, and managing notebooksentry_operations.py: Tools for creating entries and uploading attachmentsapi_reference.md: Comprehensive API endpoint documentation with parameters and examplesauthentication_guide.md: Detailed authentication setup and configuration instructionsintegrations.md: Third-party integration setup guides and use casesWeekly Installs
116
Repository
GitHub Stars
22.6K
First Seen
Jan 21, 2026
Security Audits
Gen Agent Trust HubFailSocketPassSnykFail
Installed on
claude-code101
opencode92
cursor89
gemini-cli88
antigravity82
codex77
通过 LiteLLM 代理让 Claude Code 对接 GitHub Copilot 运行 | 高级变通方案指南
40,000 周安装