ai-parrot 0.17.2__cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- agentui/.prettierrc +15 -0
- agentui/QUICKSTART.md +272 -0
- agentui/README.md +59 -0
- agentui/env.example +16 -0
- agentui/jsconfig.json +14 -0
- agentui/package-lock.json +4242 -0
- agentui/package.json +34 -0
- agentui/scripts/postinstall/apply-patches.mjs +260 -0
- agentui/src/app.css +61 -0
- agentui/src/app.d.ts +13 -0
- agentui/src/app.html +12 -0
- agentui/src/components/LoadingSpinner.svelte +64 -0
- agentui/src/components/ThemeSwitcher.svelte +159 -0
- agentui/src/components/index.js +4 -0
- agentui/src/lib/api/bots.ts +60 -0
- agentui/src/lib/api/chat.ts +22 -0
- agentui/src/lib/api/http.ts +25 -0
- agentui/src/lib/components/BotCard.svelte +33 -0
- agentui/src/lib/components/ChatBubble.svelte +63 -0
- agentui/src/lib/components/Toast.svelte +21 -0
- agentui/src/lib/config.ts +20 -0
- agentui/src/lib/stores/auth.svelte.ts +73 -0
- agentui/src/lib/stores/theme.svelte.js +64 -0
- agentui/src/lib/stores/toast.svelte.ts +31 -0
- agentui/src/lib/utils/conversation.ts +39 -0
- agentui/src/routes/+layout.svelte +20 -0
- agentui/src/routes/+page.svelte +232 -0
- agentui/src/routes/login/+page.svelte +200 -0
- agentui/src/routes/talk/[agentId]/+page.svelte +297 -0
- agentui/src/routes/talk/[agentId]/+page.ts +7 -0
- agentui/static/README.md +1 -0
- agentui/svelte.config.js +11 -0
- agentui/tailwind.config.ts +53 -0
- agentui/tsconfig.json +3 -0
- agentui/vite.config.ts +10 -0
- ai_parrot-0.17.2.dist-info/METADATA +472 -0
- ai_parrot-0.17.2.dist-info/RECORD +535 -0
- ai_parrot-0.17.2.dist-info/WHEEL +6 -0
- ai_parrot-0.17.2.dist-info/entry_points.txt +2 -0
- ai_parrot-0.17.2.dist-info/licenses/LICENSE +21 -0
- ai_parrot-0.17.2.dist-info/top_level.txt +6 -0
- crew-builder/.prettierrc +15 -0
- crew-builder/QUICKSTART.md +259 -0
- crew-builder/README.md +113 -0
- crew-builder/env.example +17 -0
- crew-builder/jsconfig.json +14 -0
- crew-builder/package-lock.json +4182 -0
- crew-builder/package.json +37 -0
- crew-builder/scripts/postinstall/apply-patches.mjs +260 -0
- crew-builder/src/app.css +62 -0
- crew-builder/src/app.d.ts +13 -0
- crew-builder/src/app.html +12 -0
- crew-builder/src/components/LoadingSpinner.svelte +64 -0
- crew-builder/src/components/ThemeSwitcher.svelte +149 -0
- crew-builder/src/components/index.js +9 -0
- crew-builder/src/lib/api/bots.ts +60 -0
- crew-builder/src/lib/api/chat.ts +80 -0
- crew-builder/src/lib/api/client.ts +56 -0
- crew-builder/src/lib/api/crew/crew.ts +136 -0
- crew-builder/src/lib/api/index.ts +5 -0
- crew-builder/src/lib/api/o365/auth.ts +65 -0
- crew-builder/src/lib/auth/auth.ts +54 -0
- crew-builder/src/lib/components/AgentNode.svelte +43 -0
- crew-builder/src/lib/components/BotCard.svelte +33 -0
- crew-builder/src/lib/components/ChatBubble.svelte +67 -0
- crew-builder/src/lib/components/ConfigPanel.svelte +278 -0
- crew-builder/src/lib/components/JsonTreeNode.svelte +76 -0
- crew-builder/src/lib/components/JsonViewer.svelte +24 -0
- crew-builder/src/lib/components/MarkdownEditor.svelte +48 -0
- crew-builder/src/lib/components/ThemeToggle.svelte +36 -0
- crew-builder/src/lib/components/Toast.svelte +67 -0
- crew-builder/src/lib/components/Toolbar.svelte +157 -0
- crew-builder/src/lib/components/index.ts +10 -0
- crew-builder/src/lib/config.ts +8 -0
- crew-builder/src/lib/stores/auth.svelte.ts +228 -0
- crew-builder/src/lib/stores/crewStore.ts +369 -0
- crew-builder/src/lib/stores/theme.svelte.js +145 -0
- crew-builder/src/lib/stores/toast.svelte.ts +69 -0
- crew-builder/src/lib/utils/conversation.ts +39 -0
- crew-builder/src/lib/utils/markdown.ts +122 -0
- crew-builder/src/lib/utils/talkHistory.ts +47 -0
- crew-builder/src/routes/+layout.svelte +20 -0
- crew-builder/src/routes/+page.svelte +539 -0
- crew-builder/src/routes/agents/+page.svelte +247 -0
- crew-builder/src/routes/agents/[agentId]/+page.svelte +288 -0
- crew-builder/src/routes/agents/[agentId]/+page.ts +7 -0
- crew-builder/src/routes/builder/+page.svelte +204 -0
- crew-builder/src/routes/crew/ask/+page.svelte +1052 -0
- crew-builder/src/routes/crew/ask/+page.ts +1 -0
- crew-builder/src/routes/integrations/o365/+page.svelte +304 -0
- crew-builder/src/routes/login/+page.svelte +197 -0
- crew-builder/src/routes/talk/[agentId]/+page.svelte +487 -0
- crew-builder/src/routes/talk/[agentId]/+page.ts +7 -0
- crew-builder/static/README.md +1 -0
- crew-builder/svelte.config.js +11 -0
- crew-builder/tailwind.config.ts +53 -0
- crew-builder/tsconfig.json +3 -0
- crew-builder/vite.config.ts +10 -0
- mcp_servers/calculator_server.py +309 -0
- parrot/__init__.py +27 -0
- parrot/__pycache__/__init__.cpython-310.pyc +0 -0
- parrot/__pycache__/version.cpython-310.pyc +0 -0
- parrot/_version.py +34 -0
- parrot/a2a/__init__.py +48 -0
- parrot/a2a/client.py +658 -0
- parrot/a2a/discovery.py +89 -0
- parrot/a2a/mixin.py +257 -0
- parrot/a2a/models.py +376 -0
- parrot/a2a/server.py +770 -0
- parrot/agents/__init__.py +29 -0
- parrot/bots/__init__.py +12 -0
- parrot/bots/a2a_agent.py +19 -0
- parrot/bots/abstract.py +3139 -0
- parrot/bots/agent.py +1129 -0
- parrot/bots/basic.py +9 -0
- parrot/bots/chatbot.py +669 -0
- parrot/bots/data.py +1618 -0
- parrot/bots/database/__init__.py +5 -0
- parrot/bots/database/abstract.py +3071 -0
- parrot/bots/database/cache.py +286 -0
- parrot/bots/database/models.py +468 -0
- parrot/bots/database/prompts.py +154 -0
- parrot/bots/database/retries.py +98 -0
- parrot/bots/database/router.py +269 -0
- parrot/bots/database/sql.py +41 -0
- parrot/bots/db/__init__.py +6 -0
- parrot/bots/db/abstract.py +556 -0
- parrot/bots/db/bigquery.py +602 -0
- parrot/bots/db/cache.py +85 -0
- parrot/bots/db/documentdb.py +668 -0
- parrot/bots/db/elastic.py +1014 -0
- parrot/bots/db/influx.py +898 -0
- parrot/bots/db/mock.py +96 -0
- parrot/bots/db/multi.py +783 -0
- parrot/bots/db/prompts.py +185 -0
- parrot/bots/db/sql.py +1255 -0
- parrot/bots/db/tools.py +212 -0
- parrot/bots/document.py +680 -0
- parrot/bots/hrbot.py +15 -0
- parrot/bots/kb.py +170 -0
- parrot/bots/mcp.py +36 -0
- parrot/bots/orchestration/README.md +463 -0
- parrot/bots/orchestration/__init__.py +1 -0
- parrot/bots/orchestration/agent.py +155 -0
- parrot/bots/orchestration/crew.py +3330 -0
- parrot/bots/orchestration/fsm.py +1179 -0
- parrot/bots/orchestration/hr.py +434 -0
- parrot/bots/orchestration/storage/__init__.py +4 -0
- parrot/bots/orchestration/storage/memory.py +100 -0
- parrot/bots/orchestration/storage/mixin.py +119 -0
- parrot/bots/orchestration/verify.py +202 -0
- parrot/bots/product.py +204 -0
- parrot/bots/prompts/__init__.py +96 -0
- parrot/bots/prompts/agents.py +155 -0
- parrot/bots/prompts/data.py +216 -0
- parrot/bots/prompts/output_generation.py +8 -0
- parrot/bots/scraper/__init__.py +3 -0
- parrot/bots/scraper/models.py +122 -0
- parrot/bots/scraper/scraper.py +1173 -0
- parrot/bots/scraper/templates.py +115 -0
- parrot/bots/stores/__init__.py +5 -0
- parrot/bots/stores/local.py +172 -0
- parrot/bots/webdev.py +81 -0
- parrot/cli.py +17 -0
- parrot/clients/__init__.py +16 -0
- parrot/clients/base.py +1491 -0
- parrot/clients/claude.py +1191 -0
- parrot/clients/factory.py +129 -0
- parrot/clients/google.py +4567 -0
- parrot/clients/gpt.py +1975 -0
- parrot/clients/grok.py +432 -0
- parrot/clients/groq.py +986 -0
- parrot/clients/hf.py +582 -0
- parrot/clients/models.py +18 -0
- parrot/conf.py +395 -0
- parrot/embeddings/__init__.py +9 -0
- parrot/embeddings/base.py +157 -0
- parrot/embeddings/google.py +98 -0
- parrot/embeddings/huggingface.py +74 -0
- parrot/embeddings/openai.py +84 -0
- parrot/embeddings/processor.py +88 -0
- parrot/exceptions.c +13868 -0
- parrot/exceptions.cpython-310-x86_64-linux-gnu.so +0 -0
- parrot/exceptions.pxd +22 -0
- parrot/exceptions.pxi +15 -0
- parrot/exceptions.pyx +44 -0
- parrot/generators/__init__.py +29 -0
- parrot/generators/base.py +200 -0
- parrot/generators/html.py +293 -0
- parrot/generators/react.py +205 -0
- parrot/generators/streamlit.py +203 -0
- parrot/generators/template.py +105 -0
- parrot/handlers/__init__.py +4 -0
- parrot/handlers/agent.py +861 -0
- parrot/handlers/agents/__init__.py +1 -0
- parrot/handlers/agents/abstract.py +900 -0
- parrot/handlers/bots.py +338 -0
- parrot/handlers/chat.py +915 -0
- parrot/handlers/creation.sql +192 -0
- parrot/handlers/crew/ARCHITECTURE.md +362 -0
- parrot/handlers/crew/README_BOTMANAGER_PERSISTENCE.md +303 -0
- parrot/handlers/crew/README_REDIS_PERSISTENCE.md +366 -0
- parrot/handlers/crew/__init__.py +0 -0
- parrot/handlers/crew/handler.py +801 -0
- parrot/handlers/crew/models.py +229 -0
- parrot/handlers/crew/redis_persistence.py +523 -0
- parrot/handlers/jobs/__init__.py +10 -0
- parrot/handlers/jobs/job.py +384 -0
- parrot/handlers/jobs/mixin.py +627 -0
- parrot/handlers/jobs/models.py +115 -0
- parrot/handlers/jobs/worker.py +31 -0
- parrot/handlers/models.py +596 -0
- parrot/handlers/o365_auth.py +105 -0
- parrot/handlers/stream.py +337 -0
- parrot/interfaces/__init__.py +6 -0
- parrot/interfaces/aws.py +143 -0
- parrot/interfaces/credentials.py +113 -0
- parrot/interfaces/database.py +27 -0
- parrot/interfaces/google.py +1123 -0
- parrot/interfaces/hierarchy.py +1227 -0
- parrot/interfaces/http.py +651 -0
- parrot/interfaces/images/__init__.py +0 -0
- parrot/interfaces/images/plugins/__init__.py +24 -0
- parrot/interfaces/images/plugins/abstract.py +58 -0
- parrot/interfaces/images/plugins/analisys.py +148 -0
- parrot/interfaces/images/plugins/classify.py +150 -0
- parrot/interfaces/images/plugins/classifybase.py +182 -0
- parrot/interfaces/images/plugins/detect.py +150 -0
- parrot/interfaces/images/plugins/exif.py +1103 -0
- parrot/interfaces/images/plugins/hash.py +52 -0
- parrot/interfaces/images/plugins/vision.py +104 -0
- parrot/interfaces/images/plugins/yolo.py +66 -0
- parrot/interfaces/images/plugins/zerodetect.py +197 -0
- parrot/interfaces/o365.py +978 -0
- parrot/interfaces/onedrive.py +822 -0
- parrot/interfaces/sharepoint.py +1435 -0
- parrot/interfaces/soap.py +257 -0
- parrot/loaders/__init__.py +8 -0
- parrot/loaders/abstract.py +1131 -0
- parrot/loaders/audio.py +199 -0
- parrot/loaders/basepdf.py +53 -0
- parrot/loaders/basevideo.py +1568 -0
- parrot/loaders/csv.py +409 -0
- parrot/loaders/docx.py +116 -0
- parrot/loaders/epubloader.py +316 -0
- parrot/loaders/excel.py +199 -0
- parrot/loaders/factory.py +55 -0
- parrot/loaders/files/__init__.py +0 -0
- parrot/loaders/files/abstract.py +39 -0
- parrot/loaders/files/html.py +26 -0
- parrot/loaders/files/text.py +63 -0
- parrot/loaders/html.py +152 -0
- parrot/loaders/markdown.py +442 -0
- parrot/loaders/pdf.py +373 -0
- parrot/loaders/pdfmark.py +320 -0
- parrot/loaders/pdftables.py +506 -0
- parrot/loaders/ppt.py +476 -0
- parrot/loaders/qa.py +63 -0
- parrot/loaders/splitters/__init__.py +10 -0
- parrot/loaders/splitters/base.py +138 -0
- parrot/loaders/splitters/md.py +228 -0
- parrot/loaders/splitters/token.py +143 -0
- parrot/loaders/txt.py +26 -0
- parrot/loaders/video.py +89 -0
- parrot/loaders/videolocal.py +218 -0
- parrot/loaders/videounderstanding.py +377 -0
- parrot/loaders/vimeo.py +167 -0
- parrot/loaders/web.py +599 -0
- parrot/loaders/youtube.py +504 -0
- parrot/manager/__init__.py +5 -0
- parrot/manager/manager.py +1030 -0
- parrot/mcp/__init__.py +28 -0
- parrot/mcp/adapter.py +105 -0
- parrot/mcp/cli.py +174 -0
- parrot/mcp/client.py +119 -0
- parrot/mcp/config.py +75 -0
- parrot/mcp/integration.py +842 -0
- parrot/mcp/oauth.py +933 -0
- parrot/mcp/server.py +225 -0
- parrot/mcp/transports/__init__.py +3 -0
- parrot/mcp/transports/base.py +279 -0
- parrot/mcp/transports/grpc_session.py +163 -0
- parrot/mcp/transports/http.py +312 -0
- parrot/mcp/transports/mcp.proto +108 -0
- parrot/mcp/transports/quic.py +1082 -0
- parrot/mcp/transports/sse.py +330 -0
- parrot/mcp/transports/stdio.py +309 -0
- parrot/mcp/transports/unix.py +395 -0
- parrot/mcp/transports/websocket.py +547 -0
- parrot/memory/__init__.py +16 -0
- parrot/memory/abstract.py +209 -0
- parrot/memory/agent.py +32 -0
- parrot/memory/cache.py +175 -0
- parrot/memory/core.py +555 -0
- parrot/memory/file.py +153 -0
- parrot/memory/mem.py +131 -0
- parrot/memory/redis.py +613 -0
- parrot/models/__init__.py +46 -0
- parrot/models/basic.py +118 -0
- parrot/models/compliance.py +208 -0
- parrot/models/crew.py +395 -0
- parrot/models/detections.py +654 -0
- parrot/models/generation.py +85 -0
- parrot/models/google.py +223 -0
- parrot/models/groq.py +23 -0
- parrot/models/openai.py +30 -0
- parrot/models/outputs.py +285 -0
- parrot/models/responses.py +938 -0
- parrot/notifications/__init__.py +743 -0
- parrot/openapi/__init__.py +3 -0
- parrot/openapi/components.yaml +641 -0
- parrot/openapi/config.py +322 -0
- parrot/outputs/__init__.py +32 -0
- parrot/outputs/formats/__init__.py +108 -0
- parrot/outputs/formats/altair.py +359 -0
- parrot/outputs/formats/application.py +122 -0
- parrot/outputs/formats/base.py +351 -0
- parrot/outputs/formats/bokeh.py +356 -0
- parrot/outputs/formats/card.py +424 -0
- parrot/outputs/formats/chart.py +436 -0
- parrot/outputs/formats/d3.py +255 -0
- parrot/outputs/formats/echarts.py +310 -0
- parrot/outputs/formats/generators/__init__.py +0 -0
- parrot/outputs/formats/generators/abstract.py +61 -0
- parrot/outputs/formats/generators/panel.py +145 -0
- parrot/outputs/formats/generators/streamlit.py +86 -0
- parrot/outputs/formats/generators/terminal.py +63 -0
- parrot/outputs/formats/holoviews.py +310 -0
- parrot/outputs/formats/html.py +147 -0
- parrot/outputs/formats/jinja2.py +46 -0
- parrot/outputs/formats/json.py +87 -0
- parrot/outputs/formats/map.py +933 -0
- parrot/outputs/formats/markdown.py +172 -0
- parrot/outputs/formats/matplotlib.py +237 -0
- parrot/outputs/formats/mixins/__init__.py +0 -0
- parrot/outputs/formats/mixins/emaps.py +855 -0
- parrot/outputs/formats/plotly.py +341 -0
- parrot/outputs/formats/seaborn.py +310 -0
- parrot/outputs/formats/table.py +397 -0
- parrot/outputs/formats/template_report.py +138 -0
- parrot/outputs/formats/yaml.py +125 -0
- parrot/outputs/formatter.py +152 -0
- parrot/outputs/templates/__init__.py +95 -0
- parrot/pipelines/__init__.py +0 -0
- parrot/pipelines/abstract.py +210 -0
- parrot/pipelines/detector.py +124 -0
- parrot/pipelines/models.py +90 -0
- parrot/pipelines/planogram.py +3002 -0
- parrot/pipelines/table.sql +97 -0
- parrot/plugins/__init__.py +106 -0
- parrot/plugins/importer.py +80 -0
- parrot/py.typed +0 -0
- parrot/registry/__init__.py +18 -0
- parrot/registry/registry.py +594 -0
- parrot/scheduler/__init__.py +1189 -0
- parrot/scheduler/models.py +60 -0
- parrot/security/__init__.py +16 -0
- parrot/security/prompt_injection.py +268 -0
- parrot/security/security_events.sql +25 -0
- parrot/services/__init__.py +1 -0
- parrot/services/mcp/__init__.py +8 -0
- parrot/services/mcp/config.py +13 -0
- parrot/services/mcp/server.py +295 -0
- parrot/services/o365_remote_auth.py +235 -0
- parrot/stores/__init__.py +7 -0
- parrot/stores/abstract.py +352 -0
- parrot/stores/arango.py +1090 -0
- parrot/stores/bigquery.py +1377 -0
- parrot/stores/cache.py +106 -0
- parrot/stores/empty.py +10 -0
- parrot/stores/faiss_store.py +1157 -0
- parrot/stores/kb/__init__.py +9 -0
- parrot/stores/kb/abstract.py +68 -0
- parrot/stores/kb/cache.py +165 -0
- parrot/stores/kb/doc.py +325 -0
- parrot/stores/kb/hierarchy.py +346 -0
- parrot/stores/kb/local.py +457 -0
- parrot/stores/kb/prompt.py +28 -0
- parrot/stores/kb/redis.py +659 -0
- parrot/stores/kb/store.py +115 -0
- parrot/stores/kb/user.py +374 -0
- parrot/stores/models.py +59 -0
- parrot/stores/pgvector.py +3 -0
- parrot/stores/postgres.py +2853 -0
- parrot/stores/utils/__init__.py +0 -0
- parrot/stores/utils/chunking.py +197 -0
- parrot/telemetry/__init__.py +3 -0
- parrot/telemetry/mixin.py +111 -0
- parrot/template/__init__.py +3 -0
- parrot/template/engine.py +259 -0
- parrot/tools/__init__.py +23 -0
- parrot/tools/abstract.py +644 -0
- parrot/tools/agent.py +363 -0
- parrot/tools/arangodbsearch.py +537 -0
- parrot/tools/arxiv_tool.py +188 -0
- parrot/tools/calculator/__init__.py +3 -0
- parrot/tools/calculator/operations/__init__.py +38 -0
- parrot/tools/calculator/operations/calculus.py +80 -0
- parrot/tools/calculator/operations/statistics.py +76 -0
- parrot/tools/calculator/tool.py +150 -0
- parrot/tools/cloudwatch.py +988 -0
- parrot/tools/codeinterpreter/__init__.py +127 -0
- parrot/tools/codeinterpreter/executor.py +371 -0
- parrot/tools/codeinterpreter/internals.py +473 -0
- parrot/tools/codeinterpreter/models.py +643 -0
- parrot/tools/codeinterpreter/prompts.py +224 -0
- parrot/tools/codeinterpreter/tool.py +664 -0
- parrot/tools/company_info/__init__.py +6 -0
- parrot/tools/company_info/tool.py +1138 -0
- parrot/tools/correlationanalysis.py +437 -0
- parrot/tools/database/abstract.py +286 -0
- parrot/tools/database/bq.py +115 -0
- parrot/tools/database/cache.py +284 -0
- parrot/tools/database/models.py +95 -0
- parrot/tools/database/pg.py +343 -0
- parrot/tools/databasequery.py +1159 -0
- parrot/tools/db.py +1800 -0
- parrot/tools/ddgo.py +370 -0
- parrot/tools/decorators.py +271 -0
- parrot/tools/dftohtml.py +282 -0
- parrot/tools/document.py +549 -0
- parrot/tools/ecs.py +819 -0
- parrot/tools/edareport.py +368 -0
- parrot/tools/elasticsearch.py +1049 -0
- parrot/tools/employees.py +462 -0
- parrot/tools/epson/__init__.py +96 -0
- parrot/tools/excel.py +683 -0
- parrot/tools/file/__init__.py +13 -0
- parrot/tools/file/abstract.py +76 -0
- parrot/tools/file/gcs.py +378 -0
- parrot/tools/file/local.py +284 -0
- parrot/tools/file/s3.py +511 -0
- parrot/tools/file/tmp.py +309 -0
- parrot/tools/file/tool.py +501 -0
- parrot/tools/file_reader.py +129 -0
- parrot/tools/flowtask/__init__.py +19 -0
- parrot/tools/flowtask/tool.py +761 -0
- parrot/tools/gittoolkit.py +508 -0
- parrot/tools/google/__init__.py +18 -0
- parrot/tools/google/base.py +169 -0
- parrot/tools/google/tools.py +1251 -0
- parrot/tools/googlelocation.py +5 -0
- parrot/tools/googleroutes.py +5 -0
- parrot/tools/googlesearch.py +5 -0
- parrot/tools/googlesitesearch.py +5 -0
- parrot/tools/googlevoice.py +2 -0
- parrot/tools/gvoice.py +695 -0
- parrot/tools/ibisworld/README.md +225 -0
- parrot/tools/ibisworld/__init__.py +11 -0
- parrot/tools/ibisworld/tool.py +366 -0
- parrot/tools/jiratoolkit.py +1718 -0
- parrot/tools/manager.py +1098 -0
- parrot/tools/math.py +152 -0
- parrot/tools/metadata.py +476 -0
- parrot/tools/msteams.py +1621 -0
- parrot/tools/msword.py +635 -0
- parrot/tools/multidb.py +580 -0
- parrot/tools/multistoresearch.py +369 -0
- parrot/tools/networkninja.py +167 -0
- parrot/tools/nextstop/__init__.py +4 -0
- parrot/tools/nextstop/base.py +286 -0
- parrot/tools/nextstop/employee.py +733 -0
- parrot/tools/nextstop/store.py +462 -0
- parrot/tools/notification.py +435 -0
- parrot/tools/o365/__init__.py +42 -0
- parrot/tools/o365/base.py +295 -0
- parrot/tools/o365/bundle.py +522 -0
- parrot/tools/o365/events.py +554 -0
- parrot/tools/o365/mail.py +992 -0
- parrot/tools/o365/onedrive.py +497 -0
- parrot/tools/o365/sharepoint.py +641 -0
- parrot/tools/openapi_toolkit.py +904 -0
- parrot/tools/openweather.py +527 -0
- parrot/tools/pdfprint.py +1001 -0
- parrot/tools/powerbi.py +518 -0
- parrot/tools/powerpoint.py +1113 -0
- parrot/tools/pricestool.py +146 -0
- parrot/tools/products/__init__.py +246 -0
- parrot/tools/prophet_tool.py +171 -0
- parrot/tools/pythonpandas.py +630 -0
- parrot/tools/pythonrepl.py +910 -0
- parrot/tools/qsource.py +436 -0
- parrot/tools/querytoolkit.py +395 -0
- parrot/tools/quickeda.py +827 -0
- parrot/tools/resttool.py +553 -0
- parrot/tools/retail/__init__.py +0 -0
- parrot/tools/retail/bby.py +528 -0
- parrot/tools/sandboxtool.py +703 -0
- parrot/tools/sassie/__init__.py +352 -0
- parrot/tools/scraping/__init__.py +7 -0
- parrot/tools/scraping/docs/select.md +466 -0
- parrot/tools/scraping/documentation.md +1278 -0
- parrot/tools/scraping/driver.py +436 -0
- parrot/tools/scraping/models.py +576 -0
- parrot/tools/scraping/options.py +85 -0
- parrot/tools/scraping/orchestrator.py +517 -0
- parrot/tools/scraping/readme.md +740 -0
- parrot/tools/scraping/tool.py +3115 -0
- parrot/tools/seasonaldetection.py +642 -0
- parrot/tools/shell_tool/__init__.py +5 -0
- parrot/tools/shell_tool/actions.py +408 -0
- parrot/tools/shell_tool/engine.py +155 -0
- parrot/tools/shell_tool/models.py +322 -0
- parrot/tools/shell_tool/tool.py +442 -0
- parrot/tools/site_search.py +214 -0
- parrot/tools/textfile.py +418 -0
- parrot/tools/think.py +378 -0
- parrot/tools/toolkit.py +298 -0
- parrot/tools/webapp_tool.py +187 -0
- parrot/tools/whatif.py +1279 -0
- parrot/tools/workday/MULTI_WSDL_EXAMPLE.md +249 -0
- parrot/tools/workday/__init__.py +6 -0
- parrot/tools/workday/models.py +1389 -0
- parrot/tools/workday/tool.py +1293 -0
- parrot/tools/yfinance_tool.py +306 -0
- parrot/tools/zipcode.py +217 -0
- parrot/utils/__init__.py +2 -0
- parrot/utils/helpers.py +73 -0
- parrot/utils/parsers/__init__.py +5 -0
- parrot/utils/parsers/toml.c +12078 -0
- parrot/utils/parsers/toml.cpython-310-x86_64-linux-gnu.so +0 -0
- parrot/utils/parsers/toml.pyx +21 -0
- parrot/utils/toml.py +11 -0
- parrot/utils/types.cpp +20936 -0
- parrot/utils/types.cpython-310-x86_64-linux-gnu.so +0 -0
- parrot/utils/types.pyx +213 -0
- parrot/utils/uv.py +11 -0
- parrot/version.py +10 -0
- parrot/yaml-rs/Cargo.lock +350 -0
- parrot/yaml-rs/Cargo.toml +19 -0
- parrot/yaml-rs/pyproject.toml +19 -0
- parrot/yaml-rs/python/yaml_rs/__init__.py +81 -0
- parrot/yaml-rs/src/lib.rs +222 -0
- requirements/docker-compose.yml +24 -0
- requirements/requirements-dev.txt +21 -0
|
Binary file
|
parrot/utils/types.pyx
ADDED
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
# cython: language_level=3, embedsignature=True, boundscheck=False, wraparound=True, initializedcheck=False
|
|
2
|
+
# Copyright (C) 2018-present Jesus Lara
|
|
3
|
+
#
|
|
4
|
+
import time
|
|
5
|
+
import orjson
|
|
6
|
+
from typing import (
|
|
7
|
+
Dict
|
|
8
|
+
)
|
|
9
|
+
from collections.abc import Sequence
|
|
10
|
+
from decimal import Decimal
|
|
11
|
+
from numpy import int64, ndarray
|
|
12
|
+
from datetime import timezone
|
|
13
|
+
from cpython cimport datetime
|
|
14
|
+
from zoneinfo import ZoneInfo
|
|
15
|
+
from uuid import UUID
|
|
16
|
+
from dateutil.parser import parse, ParserError
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
|
|
20
|
+
cpdef object strtobool(str val):
|
|
21
|
+
"""Convert a string representation of truth to true (1) or false (0).
|
|
22
|
+
|
|
23
|
+
True values are 'y', 'yes', 't', 'true', 'on', and '1'; false values
|
|
24
|
+
are 'n', 'no', 'f', 'false', 'off', and '0'. Raises ValueError if
|
|
25
|
+
'val' is anything else.
|
|
26
|
+
"""
|
|
27
|
+
val = val.lower()
|
|
28
|
+
if val in ('y', 'yes', 't', 'true', 'on', '1'):
|
|
29
|
+
return True
|
|
30
|
+
elif val in ('n', 'no', 'f', 'false', 'off', '0', 'null'):
|
|
31
|
+
return False
|
|
32
|
+
else:
|
|
33
|
+
raise ValueError(
|
|
34
|
+
f"invalid truth value for {val}"
|
|
35
|
+
)
|
|
36
|
+
|
|
37
|
+
|
|
38
|
+
cpdef datetime.date to_date(object value, str mask = "%Y-%m-%d %H:%M:%S", str tz = None):
|
|
39
|
+
if isinstance(value, datetime.datetime):
|
|
40
|
+
return value
|
|
41
|
+
else:
|
|
42
|
+
try:
|
|
43
|
+
result = datetime.datetime.strptime(str(value), mask)
|
|
44
|
+
if tz is not None:
|
|
45
|
+
zone = ZoneInfo(key=tz)
|
|
46
|
+
result = result.replace(tzinfo=zone)
|
|
47
|
+
return result
|
|
48
|
+
except (TypeError, ValueError, AttributeError):
|
|
49
|
+
return parse(str(value))
|
|
50
|
+
|
|
51
|
+
|
|
52
|
+
cpdef datetime.time to_time(object value, str mask = "%H:%M:%S"):
|
|
53
|
+
if value == 0:
|
|
54
|
+
return datetime.datetime.now().replace(
|
|
55
|
+
hour=0, minute=0, second=0, microsecond=0
|
|
56
|
+
)
|
|
57
|
+
if isinstance(value, datetime.time):
|
|
58
|
+
return value
|
|
59
|
+
elif isinstance(value, datetime.datetime):
|
|
60
|
+
return value.time()
|
|
61
|
+
else:
|
|
62
|
+
if len(str(value)) < 6:
|
|
63
|
+
value = str(value).zfill(6)
|
|
64
|
+
try:
|
|
65
|
+
return datetime.datetime.strptime(str(value), mask)
|
|
66
|
+
except ValueError:
|
|
67
|
+
return datetime.datetime.strptime(str(value), "%H:%M:%S")
|
|
68
|
+
|
|
69
|
+
|
|
70
|
+
cpdef datetime.datetime to_datetime(object value, str mask = "%Y-%m-%d %H:%M:%S"):
|
|
71
|
+
if isinstance(value, datetime.datetime):
|
|
72
|
+
return value
|
|
73
|
+
elif isinstance(value, list):
|
|
74
|
+
dt = to_date(value[0], mask=mask[0])
|
|
75
|
+
mt = to_time(value[1], mask=mask[1]).time()
|
|
76
|
+
return datetime.datetime.combine(dt, mt)
|
|
77
|
+
else:
|
|
78
|
+
if value is None:
|
|
79
|
+
return datetime.datetime.now().replace(
|
|
80
|
+
hour=0, minute=0, second=0, microsecond=0
|
|
81
|
+
)
|
|
82
|
+
else:
|
|
83
|
+
return datetime.datetime.strptime(str(value), mask)
|
|
84
|
+
|
|
85
|
+
|
|
86
|
+
cpdef datetime.datetime epoch_to_date(object value, str tz = None):
|
|
87
|
+
if value is None:
|
|
88
|
+
return None
|
|
89
|
+
if len(str(value)) == 10:
|
|
90
|
+
s = value
|
|
91
|
+
elif len(str(value)) == 19:
|
|
92
|
+
s = value / 1e9
|
|
93
|
+
else:
|
|
94
|
+
s, _ = divmod(value, 1000.0)
|
|
95
|
+
if tz is not None:
|
|
96
|
+
zone = ZoneInfo(key=tz)
|
|
97
|
+
else:
|
|
98
|
+
zone = timezone.utc
|
|
99
|
+
return datetime.datetime.fromtimestamp(s, zone)
|
|
100
|
+
|
|
101
|
+
|
|
102
|
+
cpdef object to_boolean(object value):
|
|
103
|
+
if isinstance(value, bool):
|
|
104
|
+
return value
|
|
105
|
+
elif value is None:
|
|
106
|
+
return False
|
|
107
|
+
else:
|
|
108
|
+
try:
|
|
109
|
+
return strtobool(value)
|
|
110
|
+
except ValueError:
|
|
111
|
+
return False
|
|
112
|
+
|
|
113
|
+
|
|
114
|
+
cpdef object is_date(object value):
|
|
115
|
+
if isinstance(value, (datetime.datetime, time, datetime.time, datetime.timedelta)):
|
|
116
|
+
return True
|
|
117
|
+
else:
|
|
118
|
+
try:
|
|
119
|
+
val = parse(value)
|
|
120
|
+
if val:
|
|
121
|
+
return True
|
|
122
|
+
return False
|
|
123
|
+
except (ParserError, ValueError):
|
|
124
|
+
return False
|
|
125
|
+
|
|
126
|
+
cdef class Entity:
|
|
127
|
+
"""Entity.
|
|
128
|
+
Used to convert entities (string, number, dates) to appropiated string on SQL queries.
|
|
129
|
+
"""
|
|
130
|
+
|
|
131
|
+
@classmethod
|
|
132
|
+
def is_integer(cls, _type):
|
|
133
|
+
return _type in (int, int64)
|
|
134
|
+
|
|
135
|
+
@classmethod
|
|
136
|
+
def is_number(cls, _type):
|
|
137
|
+
return _type in (int, int64, float, Decimal, bytes, bool)
|
|
138
|
+
|
|
139
|
+
@classmethod
|
|
140
|
+
def is_string(cls, _type):
|
|
141
|
+
return isinstance(_type, (
|
|
142
|
+
str,
|
|
143
|
+
datetime.datetime,
|
|
144
|
+
datetime.time,
|
|
145
|
+
datetime.timedelta,
|
|
146
|
+
UUID
|
|
147
|
+
))
|
|
148
|
+
|
|
149
|
+
@classmethod
|
|
150
|
+
def is_date(cls, _type):
|
|
151
|
+
return _type in (datetime.datetime, time, datetime.time, datetime.timedelta)
|
|
152
|
+
|
|
153
|
+
@classmethod
|
|
154
|
+
def is_array(cls, t):
|
|
155
|
+
return isinstance(t,(list, dict, Sequence, ndarray))
|
|
156
|
+
|
|
157
|
+
@classmethod
|
|
158
|
+
def is_bool(cls, _type):
|
|
159
|
+
return isinstance(_type, bool)
|
|
160
|
+
|
|
161
|
+
@classmethod
|
|
162
|
+
def toSQL(cls, value, _type, dbtype: str = None):
|
|
163
|
+
v = f"{value!r}" if Entity.is_date(_type) else value
|
|
164
|
+
v = f"{value!s}" if Entity.is_string(_type) and value is not None else v
|
|
165
|
+
v = value if Entity.is_number(_type) else v
|
|
166
|
+
v = str(value) if isinstance(value, UUID) else v
|
|
167
|
+
# json conversion
|
|
168
|
+
v = orjson.dumps(value) if _type in [dict, Dict] else v
|
|
169
|
+
v = f"{value!s}" if dbtype == "array" and value is not None else v
|
|
170
|
+
# formatting htstore column
|
|
171
|
+
v = (
|
|
172
|
+
",".join({"{}=>{}".format(k, v) for k, v in value.items()})
|
|
173
|
+
if isinstance(value, dict) and dbtype == "hstore"
|
|
174
|
+
else v
|
|
175
|
+
)
|
|
176
|
+
v = "NULL" if (value in ["None", "null"]) else v
|
|
177
|
+
v = "NULL" if value is None else v
|
|
178
|
+
return v
|
|
179
|
+
|
|
180
|
+
@classmethod
|
|
181
|
+
def escapeLiteral(cls, value, _type, dbtype: str = None):
|
|
182
|
+
v = value if value != "None" or value is not None else ""
|
|
183
|
+
v = f"{value!r}" if Entity.is_string(_type) else v
|
|
184
|
+
v = value if Entity.is_number(_type) else f"{value!r}"
|
|
185
|
+
v = f"array{value!s}" if dbtype == "array" else v
|
|
186
|
+
v = f"{value!r}" if dbtype == "hstore" else v
|
|
187
|
+
v = value if (value in ["None", "null", "NULL"]) else v
|
|
188
|
+
return v
|
|
189
|
+
|
|
190
|
+
@classmethod
|
|
191
|
+
def escapeString(cls, value):
|
|
192
|
+
v = value if value != "None" else ""
|
|
193
|
+
v = str(v).replace("'", "''")
|
|
194
|
+
v = "'{}'".format(v) if Entity.is_string(type(value)) else v
|
|
195
|
+
return v
|
|
196
|
+
|
|
197
|
+
@classmethod
|
|
198
|
+
def quoteString(cls, value):
|
|
199
|
+
v = value if value != "None" else ""
|
|
200
|
+
v = "'{}'".format(v) if type(v) == str else v
|
|
201
|
+
return v
|
|
202
|
+
|
|
203
|
+
class SafeDict(dict):
|
|
204
|
+
"""
|
|
205
|
+
SafeDict.
|
|
206
|
+
|
|
207
|
+
Allow to using partial format strings
|
|
208
|
+
|
|
209
|
+
"""
|
|
210
|
+
|
|
211
|
+
def __missing__(self, key):
|
|
212
|
+
"""Missing method for SafeDict."""
|
|
213
|
+
return "{" + key + "}"
|
parrot/utils/uv.py
ADDED
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import asyncio
|
|
2
|
+
|
|
3
|
+
|
|
4
|
+
def install_uvloop():
|
|
5
|
+
"""install uvloop and set as default loop for asyncio."""
|
|
6
|
+
try:
|
|
7
|
+
import uvloop # noqa # pylint: disable=import-outside-toplevel
|
|
8
|
+
asyncio.set_event_loop_policy(uvloop.EventLoopPolicy())
|
|
9
|
+
uvloop.install()
|
|
10
|
+
except ImportError:
|
|
11
|
+
pass
|
parrot/version.py
ADDED
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
"""Nav Parrot Meta information."""
|
|
2
|
+
|
|
3
|
+
__title__ = "ai-parrot"
|
|
4
|
+
__description__ = "Live Chatbots based on Langchain chatbots and Agents \
|
|
5
|
+
Integrated into Navigator Framework or used into any aiohttp applications."
|
|
6
|
+
__version__ = "0.17.2"
|
|
7
|
+
__author__ = "Jesus Lara"
|
|
8
|
+
__author_email__ = "jesuslarag@gmail.com"
|
|
9
|
+
__license__ = "MIT"
|
|
10
|
+
__copyright__ = "Copyright (c) 2020-2024 Jesus Lara"
|
|
@@ -0,0 +1,350 @@
|
|
|
1
|
+
# This file is automatically @generated by Cargo.
|
|
2
|
+
# It is not intended for manual editing.
|
|
3
|
+
version = 4
|
|
4
|
+
|
|
5
|
+
[[package]]
|
|
6
|
+
name = "autocfg"
|
|
7
|
+
version = "1.5.0"
|
|
8
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
9
|
+
checksum = "c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8"
|
|
10
|
+
|
|
11
|
+
[[package]]
|
|
12
|
+
name = "bitflags"
|
|
13
|
+
version = "2.10.0"
|
|
14
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
15
|
+
checksum = "812e12b5285cc515a9c72a5c1d3b6d46a19dac5acfef5265968c166106e31dd3"
|
|
16
|
+
|
|
17
|
+
[[package]]
|
|
18
|
+
name = "cfg-if"
|
|
19
|
+
version = "1.0.4"
|
|
20
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
21
|
+
checksum = "9330f8b2ff13f34540b44e946ef35111825727b38d33286ef986142615121801"
|
|
22
|
+
|
|
23
|
+
[[package]]
|
|
24
|
+
name = "equivalent"
|
|
25
|
+
version = "1.0.2"
|
|
26
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
27
|
+
checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f"
|
|
28
|
+
|
|
29
|
+
[[package]]
|
|
30
|
+
name = "hashbrown"
|
|
31
|
+
version = "0.16.0"
|
|
32
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
33
|
+
checksum = "5419bdc4f6a9207fbeba6d11b604d481addf78ecd10c11ad51e76c2f6482748d"
|
|
34
|
+
|
|
35
|
+
[[package]]
|
|
36
|
+
name = "heck"
|
|
37
|
+
version = "0.4.1"
|
|
38
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
39
|
+
checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8"
|
|
40
|
+
|
|
41
|
+
[[package]]
|
|
42
|
+
name = "indexmap"
|
|
43
|
+
version = "2.12.0"
|
|
44
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
45
|
+
checksum = "6717a8d2a5a929a1a2eb43a12812498ed141a0bcfb7e8f7844fbdbe4303bba9f"
|
|
46
|
+
dependencies = [
|
|
47
|
+
"equivalent",
|
|
48
|
+
"hashbrown",
|
|
49
|
+
]
|
|
50
|
+
|
|
51
|
+
[[package]]
|
|
52
|
+
name = "indoc"
|
|
53
|
+
version = "2.0.7"
|
|
54
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
55
|
+
checksum = "79cf5c93f93228cf8efb3ba362535fb11199ac548a09ce117c9b1adc3030d706"
|
|
56
|
+
dependencies = [
|
|
57
|
+
"rustversion",
|
|
58
|
+
]
|
|
59
|
+
|
|
60
|
+
[[package]]
|
|
61
|
+
name = "itoa"
|
|
62
|
+
version = "1.0.15"
|
|
63
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
64
|
+
checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c"
|
|
65
|
+
|
|
66
|
+
[[package]]
|
|
67
|
+
name = "libc"
|
|
68
|
+
version = "0.2.177"
|
|
69
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
70
|
+
checksum = "2874a2af47a2325c2001a6e6fad9b16a53b802102b528163885171cf92b15976"
|
|
71
|
+
|
|
72
|
+
[[package]]
|
|
73
|
+
name = "lock_api"
|
|
74
|
+
version = "0.4.14"
|
|
75
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
76
|
+
checksum = "224399e74b87b5f3557511d98dff8b14089b3dadafcab6bb93eab67d3aace965"
|
|
77
|
+
dependencies = [
|
|
78
|
+
"scopeguard",
|
|
79
|
+
]
|
|
80
|
+
|
|
81
|
+
[[package]]
|
|
82
|
+
name = "memchr"
|
|
83
|
+
version = "2.7.6"
|
|
84
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
85
|
+
checksum = "f52b00d39961fc5b2736ea853c9cc86238e165017a493d1d5c8eac6bdc4cc273"
|
|
86
|
+
|
|
87
|
+
[[package]]
|
|
88
|
+
name = "memoffset"
|
|
89
|
+
version = "0.9.1"
|
|
90
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
91
|
+
checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a"
|
|
92
|
+
dependencies = [
|
|
93
|
+
"autocfg",
|
|
94
|
+
]
|
|
95
|
+
|
|
96
|
+
[[package]]
|
|
97
|
+
name = "once_cell"
|
|
98
|
+
version = "1.21.3"
|
|
99
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
100
|
+
checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d"
|
|
101
|
+
|
|
102
|
+
[[package]]
|
|
103
|
+
name = "parking_lot"
|
|
104
|
+
version = "0.12.5"
|
|
105
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
106
|
+
checksum = "93857453250e3077bd71ff98b6a65ea6621a19bb0f559a85248955ac12c45a1a"
|
|
107
|
+
dependencies = [
|
|
108
|
+
"lock_api",
|
|
109
|
+
"parking_lot_core",
|
|
110
|
+
]
|
|
111
|
+
|
|
112
|
+
[[package]]
|
|
113
|
+
name = "parking_lot_core"
|
|
114
|
+
version = "0.9.12"
|
|
115
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
116
|
+
checksum = "2621685985a2ebf1c516881c026032ac7deafcda1a2c9b7850dc81e3dfcb64c1"
|
|
117
|
+
dependencies = [
|
|
118
|
+
"cfg-if",
|
|
119
|
+
"libc",
|
|
120
|
+
"redox_syscall",
|
|
121
|
+
"smallvec",
|
|
122
|
+
"windows-link",
|
|
123
|
+
]
|
|
124
|
+
|
|
125
|
+
[[package]]
|
|
126
|
+
name = "portable-atomic"
|
|
127
|
+
version = "1.11.1"
|
|
128
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
129
|
+
checksum = "f84267b20a16ea918e43c6a88433c2d54fa145c92a811b5b047ccbe153674483"
|
|
130
|
+
|
|
131
|
+
[[package]]
|
|
132
|
+
name = "proc-macro2"
|
|
133
|
+
version = "1.0.103"
|
|
134
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
135
|
+
checksum = "5ee95bc4ef87b8d5ba32e8b7714ccc834865276eab0aed5c9958d00ec45f49e8"
|
|
136
|
+
dependencies = [
|
|
137
|
+
"unicode-ident",
|
|
138
|
+
]
|
|
139
|
+
|
|
140
|
+
[[package]]
|
|
141
|
+
name = "pyo3"
|
|
142
|
+
version = "0.20.3"
|
|
143
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
144
|
+
checksum = "53bdbb96d49157e65d45cc287af5f32ffadd5f4761438b527b055fb0d4bb8233"
|
|
145
|
+
dependencies = [
|
|
146
|
+
"cfg-if",
|
|
147
|
+
"indoc",
|
|
148
|
+
"libc",
|
|
149
|
+
"memoffset",
|
|
150
|
+
"parking_lot",
|
|
151
|
+
"portable-atomic",
|
|
152
|
+
"pyo3-build-config",
|
|
153
|
+
"pyo3-ffi",
|
|
154
|
+
"pyo3-macros",
|
|
155
|
+
"unindent",
|
|
156
|
+
]
|
|
157
|
+
|
|
158
|
+
[[package]]
|
|
159
|
+
name = "pyo3-build-config"
|
|
160
|
+
version = "0.20.3"
|
|
161
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
162
|
+
checksum = "deaa5745de3f5231ce10517a1f5dd97d53e5a2fd77aa6b5842292085831d48d7"
|
|
163
|
+
dependencies = [
|
|
164
|
+
"once_cell",
|
|
165
|
+
"target-lexicon",
|
|
166
|
+
]
|
|
167
|
+
|
|
168
|
+
[[package]]
|
|
169
|
+
name = "pyo3-ffi"
|
|
170
|
+
version = "0.20.3"
|
|
171
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
172
|
+
checksum = "62b42531d03e08d4ef1f6e85a2ed422eb678b8cd62b762e53891c05faf0d4afa"
|
|
173
|
+
dependencies = [
|
|
174
|
+
"libc",
|
|
175
|
+
"pyo3-build-config",
|
|
176
|
+
]
|
|
177
|
+
|
|
178
|
+
[[package]]
|
|
179
|
+
name = "pyo3-macros"
|
|
180
|
+
version = "0.20.3"
|
|
181
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
182
|
+
checksum = "7305c720fa01b8055ec95e484a6eca7a83c841267f0dd5280f0c8b8551d2c158"
|
|
183
|
+
dependencies = [
|
|
184
|
+
"proc-macro2",
|
|
185
|
+
"pyo3-macros-backend",
|
|
186
|
+
"quote",
|
|
187
|
+
"syn",
|
|
188
|
+
]
|
|
189
|
+
|
|
190
|
+
[[package]]
|
|
191
|
+
name = "pyo3-macros-backend"
|
|
192
|
+
version = "0.20.3"
|
|
193
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
194
|
+
checksum = "7c7e9b68bb9c3149c5b0cade5d07f953d6d125eb4337723c4ccdb665f1f96185"
|
|
195
|
+
dependencies = [
|
|
196
|
+
"heck",
|
|
197
|
+
"proc-macro2",
|
|
198
|
+
"pyo3-build-config",
|
|
199
|
+
"quote",
|
|
200
|
+
"syn",
|
|
201
|
+
]
|
|
202
|
+
|
|
203
|
+
[[package]]
|
|
204
|
+
name = "quote"
|
|
205
|
+
version = "1.0.41"
|
|
206
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
207
|
+
checksum = "ce25767e7b499d1b604768e7cde645d14cc8584231ea6b295e9c9eb22c02e1d1"
|
|
208
|
+
dependencies = [
|
|
209
|
+
"proc-macro2",
|
|
210
|
+
]
|
|
211
|
+
|
|
212
|
+
[[package]]
|
|
213
|
+
name = "redox_syscall"
|
|
214
|
+
version = "0.5.18"
|
|
215
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
216
|
+
checksum = "ed2bf2547551a7053d6fdfafda3f938979645c44812fbfcda098faae3f1a362d"
|
|
217
|
+
dependencies = [
|
|
218
|
+
"bitflags",
|
|
219
|
+
]
|
|
220
|
+
|
|
221
|
+
[[package]]
|
|
222
|
+
name = "rustversion"
|
|
223
|
+
version = "1.0.22"
|
|
224
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
225
|
+
checksum = "b39cdef0fa800fc44525c84ccb54a029961a8215f9619753635a9c0d2538d46d"
|
|
226
|
+
|
|
227
|
+
[[package]]
|
|
228
|
+
name = "ryu"
|
|
229
|
+
version = "1.0.20"
|
|
230
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
231
|
+
checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f"
|
|
232
|
+
|
|
233
|
+
[[package]]
|
|
234
|
+
name = "scopeguard"
|
|
235
|
+
version = "1.2.0"
|
|
236
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
237
|
+
checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49"
|
|
238
|
+
|
|
239
|
+
[[package]]
|
|
240
|
+
name = "serde"
|
|
241
|
+
version = "1.0.228"
|
|
242
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
243
|
+
checksum = "9a8e94ea7f378bd32cbbd37198a4a91436180c5bb472411e48b5ec2e2124ae9e"
|
|
244
|
+
dependencies = [
|
|
245
|
+
"serde_core",
|
|
246
|
+
"serde_derive",
|
|
247
|
+
]
|
|
248
|
+
|
|
249
|
+
[[package]]
|
|
250
|
+
name = "serde_core"
|
|
251
|
+
version = "1.0.228"
|
|
252
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
253
|
+
checksum = "41d385c7d4ca58e59fc732af25c3983b67ac852c1a25000afe1175de458b67ad"
|
|
254
|
+
dependencies = [
|
|
255
|
+
"serde_derive",
|
|
256
|
+
]
|
|
257
|
+
|
|
258
|
+
[[package]]
|
|
259
|
+
name = "serde_derive"
|
|
260
|
+
version = "1.0.228"
|
|
261
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
262
|
+
checksum = "d540f220d3187173da220f885ab66608367b6574e925011a9353e4badda91d79"
|
|
263
|
+
dependencies = [
|
|
264
|
+
"proc-macro2",
|
|
265
|
+
"quote",
|
|
266
|
+
"syn",
|
|
267
|
+
]
|
|
268
|
+
|
|
269
|
+
[[package]]
|
|
270
|
+
name = "serde_json"
|
|
271
|
+
version = "1.0.145"
|
|
272
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
273
|
+
checksum = "402a6f66d8c709116cf22f558eab210f5a50187f702eb4d7e5ef38d9a7f1c79c"
|
|
274
|
+
dependencies = [
|
|
275
|
+
"itoa",
|
|
276
|
+
"memchr",
|
|
277
|
+
"ryu",
|
|
278
|
+
"serde",
|
|
279
|
+
"serde_core",
|
|
280
|
+
]
|
|
281
|
+
|
|
282
|
+
[[package]]
|
|
283
|
+
name = "serde_yaml"
|
|
284
|
+
version = "0.9.34+deprecated"
|
|
285
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
286
|
+
checksum = "6a8b1a1a2ebf674015cc02edccce75287f1a0130d394307b36743c2f5d504b47"
|
|
287
|
+
dependencies = [
|
|
288
|
+
"indexmap",
|
|
289
|
+
"itoa",
|
|
290
|
+
"ryu",
|
|
291
|
+
"serde",
|
|
292
|
+
"unsafe-libyaml",
|
|
293
|
+
]
|
|
294
|
+
|
|
295
|
+
[[package]]
|
|
296
|
+
name = "smallvec"
|
|
297
|
+
version = "1.15.1"
|
|
298
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
299
|
+
checksum = "67b1b7a3b5fe4f1376887184045fcf45c69e92af734b7aaddc05fb777b6fbd03"
|
|
300
|
+
|
|
301
|
+
[[package]]
|
|
302
|
+
name = "syn"
|
|
303
|
+
version = "2.0.108"
|
|
304
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
305
|
+
checksum = "da58917d35242480a05c2897064da0a80589a2a0476c9a3f2fdc83b53502e917"
|
|
306
|
+
dependencies = [
|
|
307
|
+
"proc-macro2",
|
|
308
|
+
"quote",
|
|
309
|
+
"unicode-ident",
|
|
310
|
+
]
|
|
311
|
+
|
|
312
|
+
[[package]]
|
|
313
|
+
name = "target-lexicon"
|
|
314
|
+
version = "0.12.16"
|
|
315
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
316
|
+
checksum = "61c41af27dd6d1e27b1b16b489db798443478cef1f06a660c96db617ba5de3b1"
|
|
317
|
+
|
|
318
|
+
[[package]]
|
|
319
|
+
name = "unicode-ident"
|
|
320
|
+
version = "1.0.20"
|
|
321
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
322
|
+
checksum = "462eeb75aeb73aea900253ce739c8e18a67423fadf006037cd3ff27e82748a06"
|
|
323
|
+
|
|
324
|
+
[[package]]
|
|
325
|
+
name = "unindent"
|
|
326
|
+
version = "0.2.4"
|
|
327
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
328
|
+
checksum = "7264e107f553ccae879d21fbea1d6724ac785e8c3bfc762137959b5802826ef3"
|
|
329
|
+
|
|
330
|
+
[[package]]
|
|
331
|
+
name = "unsafe-libyaml"
|
|
332
|
+
version = "0.2.11"
|
|
333
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
334
|
+
checksum = "673aac59facbab8a9007c7f6108d11f63b603f7cabff99fabf650fea5c32b861"
|
|
335
|
+
|
|
336
|
+
[[package]]
|
|
337
|
+
name = "windows-link"
|
|
338
|
+
version = "0.2.1"
|
|
339
|
+
source = "registry+https://github.com/rust-lang/crates.io-index"
|
|
340
|
+
checksum = "f0805222e57f7521d6a62e36fa9163bc891acd422f971defe97d64e70d0a4fe5"
|
|
341
|
+
|
|
342
|
+
[[package]]
|
|
343
|
+
name = "yaml-rs"
|
|
344
|
+
version = "0.1.0"
|
|
345
|
+
dependencies = [
|
|
346
|
+
"pyo3",
|
|
347
|
+
"serde",
|
|
348
|
+
"serde_json",
|
|
349
|
+
"serde_yaml",
|
|
350
|
+
]
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
[package]
|
|
2
|
+
name = "yaml-rs"
|
|
3
|
+
version = "0.1.0"
|
|
4
|
+
edition = "2021"
|
|
5
|
+
|
|
6
|
+
[lib]
|
|
7
|
+
name = "yaml_rs"
|
|
8
|
+
crate-type = ["cdylib"]
|
|
9
|
+
|
|
10
|
+
[dependencies]
|
|
11
|
+
pyo3 = { version = "0.20", features = ["extension-module"] }
|
|
12
|
+
serde = { version = "1.0", features = ["derive"] }
|
|
13
|
+
serde_json = "1.0"
|
|
14
|
+
serde_yaml = "0.9"
|
|
15
|
+
|
|
16
|
+
[profile.release]
|
|
17
|
+
opt-level = 3
|
|
18
|
+
lto = true
|
|
19
|
+
codegen-units = 1
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["maturin>=1.0,<2.0"]
|
|
3
|
+
build-backend = "maturin"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "yaml_rs"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Fast YAML serialization using Rust and PyO3"
|
|
9
|
+
requires-python = ">=3.8"
|
|
10
|
+
classifiers = [
|
|
11
|
+
"Programming Language :: Rust",
|
|
12
|
+
"Programming Language :: Python :: Implementation :: CPython",
|
|
13
|
+
]
|
|
14
|
+
|
|
15
|
+
[tool.maturin]
|
|
16
|
+
python-source = "python"
|
|
17
|
+
module-name = "yaml_rs"
|
|
18
|
+
bindings = "pyo3"
|
|
19
|
+
features = ["pyo3/extension-module"]
|