{"id":21832992,"url":"https://github.com/null-none/django-ipfs","last_synced_at":"2025-08-02T11:09:54.894Z","repository":{"id":146602976,"uuid":"582801652","full_name":"null-none/django-ipfs","owner":"null-none","description":"IPFS storage backend for Django.","archived":false,"fork":false,"pushed_at":"2023-11-12T21:54:21.000Z","size":5,"stargazers_count":2,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-03-21T13:55:29.070Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/null-none.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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":"2022-12-27T22:52:32.000Z","updated_at":"2024-10-12T06:46:57.000Z","dependencies_parsed_at":"2023-11-12T22:29:36.516Z","dependency_job_id":"3b0d8589-40b0-48ea-a87b-0d3e9e97e1f8","html_url":"https://github.com/null-none/django-ipfs","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/null-none/django-ipfs","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/null-none%2Fdjango-ipfs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/null-none%2Fdjango-ipfs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/null-none%2Fdjango-ipfs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/null-none%2Fdjango-ipfs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/null-none","download_url":"https://codeload.github.com/null-none/django-ipfs/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/null-none%2Fdjango-ipfs/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":268378811,"owners_count":24240896,"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","status":"online","status_checked_at":"2025-08-02T02:00:12.353Z","response_time":74,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-27T19:27:26.819Z","updated_at":"2025-08-02T11:09:54.872Z","avatar_url":"https://github.com/null-none.png","language":"Python","readme":"django-ipfs\n===================\n\n\nUploads are added and pinned to the configured IPFS node,\nwhich returns the IPFS Content ID (a hash of the contents).\nThis hash is the name that is saved to your database.\nDuplicate content will also have the same address,\nsaving disk space.\n\nBecause of this only file creation and reading is supported.\n\nOther IPFS users access and reseed a piece of content \nthrough its unique content ID.\nDifferently-distributed (i.e. normal HTTP) users\ncan access the uploads through an HTTP → IPFS gateway.\n\n\nInstallation\n------------\n\n```bash\npip install django-ipfs\n```\n\n\nConfiguration\n-------------\n\nBy default `django_ipfs.storage` adds and pins content to an IPFS daemon running on localhost\nand returns URLs pointing to the public \u003chttps://ipfs.io/ipfs/\u003e HTTP Gateway\n\nTo customise this, set the following variables in your `settings.py`:\n\n- `IPFS_STORAGE_API_URL`: defaults to `'http://localhost:5001/api/v0/'`. \n- `IPFS_GATEWAY_API_URL`: defaults to `'https://ipfs.io/ipfs/'`.\n  \nSet `IPFS_GATEWAY_API_URL` to `'http://localhost:8080/ipfs/'` to serve content\nthrough your local daemon's HTTP gateway.\n\n\nUsage\n-----\n\nThere are two ways to use a Django storage backend.\n\n### As default backend\n\nUse IPFS as [Django's default file storage backend](https://docs.djangoproject.com/en/4.1/ref/settings/#std-setting-DEFAULT_FILE_STORAGE):\n\n```python\n# settings.py\n\nDEFAULT_FILE_STORAGE = 'django_ipfs.storage.InterPlanetaryFileSystemStorage'\n\nIPFS_STORAGE_API_URL = 'http://localhost:5001/api/v0/'\nIPFS_STORAGE_GATEWAY_URL = 'http://localhost:8080/ipfs/'\n```  \n\n\n### For a specific FileField\n\nAlternatively, you may only want to use the IPFS storage backend for a single field:\n\n```python\nfrom django.db import models\n\nfrom django_ipfs.storage import InterPlanetaryFileSystemStorage\n\n\nclass MyModel(models.Model):\n    # …\n    file_stored_on_ipfs = models.FileField(storage=InterPlanetaryFileSystemStorage())\n    other_file = models.FileField()  # will still use DEFAULT_FILE_STORAGE\n```\n\nDon't forget the brackets to instantiate `InterPlanetaryFileSystemStorage()` with the default arguments!\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnull-none%2Fdjango-ipfs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnull-none%2Fdjango-ipfs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnull-none%2Fdjango-ipfs/lists"}