{"id":19900027,"url":"https://github.com/scrapy-plugins/scrapy-feedexporter-azure-storage","last_synced_at":"2025-05-02T22:32:07.509Z","repository":{"id":46661267,"uuid":"432223788","full_name":"scrapy-plugins/scrapy-feedexporter-azure-storage","owner":"scrapy-plugins","description":null,"archived":false,"fork":false,"pushed_at":"2024-05-18T16:36:27.000Z","size":27,"stargazers_count":3,"open_issues_count":3,"forks_count":6,"subscribers_count":6,"default_branch":"main","last_synced_at":"2025-04-07T08:03:13.880Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/scrapy-plugins.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-11-26T15:29:35.000Z","updated_at":"2025-01-16T16:13:51.000Z","dependencies_parsed_at":"2024-03-14T11:49:07.045Z","dependency_job_id":"8efb37ca-3491-4871-90c8-d1fd5d626a0f","html_url":"https://github.com/scrapy-plugins/scrapy-feedexporter-azure-storage","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scrapy-plugins%2Fscrapy-feedexporter-azure-storage","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scrapy-plugins%2Fscrapy-feedexporter-azure-storage/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scrapy-plugins%2Fscrapy-feedexporter-azure-storage/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/scrapy-plugins%2Fscrapy-feedexporter-azure-storage/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/scrapy-plugins","download_url":"https://codeload.github.com/scrapy-plugins/scrapy-feedexporter-azure-storage/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252116459,"owners_count":21697381,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T20:10:54.046Z","updated_at":"2025-05-02T22:32:07.222Z","avatar_url":"https://github.com/scrapy-plugins.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Azure Exporter for Scrapy\n[Scrapy feed export storage backend](https://doc.scrapy.org/en/latest/topics/feed-exports.html#storage-backends) for [Azure Storage](https://docs.microsoft.com/en-us/azure/storage/).\n\n## Requirements\n-  Python 3.8+\n\n## Installation\n```bash\npip install git+https://github.com/scrapy-plugins/scrapy-feedexporter-azure-storage\n```\n## Usage\n* Add this storage backend to the [FEED_STORAGES](https://docs.scrapy.org/en/latest/topics/feed-exports.html#std-setting-FEED_STORAGES) Scrapy setting. For example:\n    ```python\n    # settings.py\n    FEED_STORAGES = {'azure': 'scrapy_azure_exporter.AzureFeedStorage'}\n    ```\n* Configure [authentication](https://docs.microsoft.com/en-us/python/api/overview/azure/storage-blob-readme?view=azure-python) via any of the following settings:\n  - `AZURE_CONNECTION_STRING` \n  - `AZURE_ACCOUNT_URL_WITH_SAS_TOKEN`\n  - `AZURE_ACCOUNT_URL` \u0026 `AZURE_ACCOUNT_KEY` - If using this method, specify both of them.\n  \n  For example,\n  ```python \n  AZURE_ACCOUNT_URL = \"https://\u003cyour-storage-account-name\u003e.blob.core.windows.net/\"\n  AZURE_ACCOUNT_KEY = \"Account key for the Azure account\"\n    ```\n* Configure in the [FEEDS](https://docs.scrapy.org/en/latest/topics/feed-exports.html#feeds) Scrapy setting the Azure URI where the feed needs to be exported.\n\n    ```python\n    FEEDS = {\n        \"azure://\u003caccount_name\u003e.blob.core.windows.net/\u003ccontainer_name\u003e/\u003cfile_name.extension\u003e\": {\n            \"format\": \"json\"\n        }\n    }\n    ```\n## Write mode and blob type\nThe `overwrite`\n[feed option](https://docs.scrapy.org/en/latest/topics/feed-exports.html#feed-options)\nis `False` by default when using this feed export storage backend.\nAn extra feed option is also provided, `blob_type`, which can be `\"BlockBlob\"` \n(default) or `\"AppendBlob\"`. See \n[Understanding blob types](https://docs.microsoft.com/en-us/rest/api/storageservices/understanding-block-blobs--append-blobs--and-page-blobs).\nThe feed options `overwrite` and `blob_type` can be combined to set the write\nmode of the feed export:\n- `overwrite=False` and `blob_type=\"BlockBlob\"` create the blob if it does not \n  exist, and fail if it exists.\n- `overwrite=False` and `blob_type=\"AppendBlob\"` append to the blob if it \n  exists and it is an `AppendBlob`, and create it otherwise. \n- `overwrite=True` overwrites the blob, even if it exists. The `blob_type` must\n  match that of the target blob.\n\n## Media pipeline usage\n\nUse the Azure pipeline for [Scrapy media pipelines](https://docs.scrapy.org/en/latest/topics/media-pipeline.html) and be able to use Azure Blob Storage.\n\nJust add the pipeline to Scrapy:\n\n```python\nITEM_PIPELINES = {\n    \"scrapy_azure_exporter.AzureFilesPipeline\": 1,\n}\n```\n\n## Azurite usage\n\nYou can use [Azurite](https://learn.microsoft.com/en-us/azure/storage/common/storage-use-azurite?tabs=visual-studio) as a storage emulator for Azure Blob Storage\nand test your application locally. Just append or set the feed storage to `azurite`.\n\n```python\n# settings.py\nFEED_STORAGES = {'azurite': 'scrapy_azure_exporter.AzureFeedStorage'}\n```\n\nAnd add the Azurite URI to the `FEEDS` setting:\n\n```python\nFEEDS = {\n    \"azurite://\u003cip\u003e:\u003cport\u003e/\u003caccount_name\u003e/\u003ccontainer_name\u003e/[\u003cfile_name.extension\u003e]\": {\n        // ...\n    }\n}\n```\n\nAnd finally run your Scrapy project as it is usually done for FilesPipeline or ImagesPipeline.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscrapy-plugins%2Fscrapy-feedexporter-azure-storage","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fscrapy-plugins%2Fscrapy-feedexporter-azure-storage","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fscrapy-plugins%2Fscrapy-feedexporter-azure-storage/lists"}