cognee/examples/guides/s3_storage.py
2026-01-15 16:20:48 +01:00

25 lines
527 B
Python

import asyncio
import cognee
async def main():
# Single file
await cognee.add("s3://cognee-s3-small-test/Natural_language_processing.txt")
# Folder/prefix (recursively expands)
await cognee.add("s3://cognee-s3-small-test")
# Mixed list
await cognee.add(
[
"s3://cognee-s3-small-test/Natural_language_processing.txt",
"Some inline text to ingest",
]
)
# Process the data
await cognee.cognify()
if __name__ == "__main__":
asyncio.run(main())