{"id":37064387,"url":"https://github.com/starnavi-team/django-postgresql-partitioning","last_synced_at":"2026-01-14T07:31:24.111Z","repository":{"id":144051995,"uuid":"150090566","full_name":"starnavi-team/django-postgresql-partitioning","owner":"starnavi-team","description":null,"archived":false,"fork":false,"pushed_at":"2025-05-21T14:00:31.000Z","size":39,"stargazers_count":12,"open_issues_count":2,"forks_count":7,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-09-27T18:02:39.281Z","etag":null,"topics":["django","django-orm","postgres","postgresql","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"isc","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/starnavi-team.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}},"created_at":"2018-09-24T11:10:26.000Z","updated_at":"2025-05-21T14:01:18.000Z","dependencies_parsed_at":"2024-02-09T17:53:14.649Z","dependency_job_id":null,"html_url":"https://github.com/starnavi-team/django-postgresql-partitioning","commit_stats":null,"previous_names":["starnavi-team/django-postgres-partitioning","starnavi-team/django-postgresql-partitioning"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/starnavi-team/django-postgresql-partitioning","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/starnavi-team%2Fdjango-postgresql-partitioning","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/starnavi-team%2Fdjango-postgresql-partitioning/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/starnavi-team%2Fdjango-postgresql-partitioning/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/starnavi-team%2Fdjango-postgresql-partitioning/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/starnavi-team","download_url":"https://codeload.github.com/starnavi-team/django-postgresql-partitioning/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/starnavi-team%2Fdjango-postgresql-partitioning/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28413352,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T05:26:33.345Z","status":"ssl_error","status_checked_at":"2026-01-14T05:21:57.251Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["django","django-orm","postgres","postgresql","python3"],"created_at":"2026-01-14T07:31:23.422Z","updated_at":"2026-01-14T07:31:24.098Z","avatar_url":"https://github.com/starnavi-team.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Django partitioning\nDjango partitioning is a package for Django,\nwhich implement PostgreSQL\n[table partitioning](https://www.postgresql.org/docs/10/static/ddl-partitioning.html)\non the fly, at the database level.\nIt creates several triggers and functions and inserts them directly into the database.\nAfter setup partitioning, record will be inserted into the correct partition,\nif partition doesn't exist, it will be created for you automatically.\n\n## Requirements\n- Django \u003e=1.11 \u003c=5.0\n- PostgreSQL \u003e= 8.0\n\nAlso, note **psycopg2-binary (2.7.5-2.9.9)** will be needed as PostgreSQL database adapter.\n\n## Installation\nInstall using `pip`...\n\n```bash\n$ pip install django-postgresql-partitioning\n```\n\n## Configuration\n- Add `partitioning` to `INSTALLED_APPS`:\n```\nINSTALLED_APPS = [\n    ...\n    partitioning,\n]\n```\n\n- Add partitioning configuration to your models:\n```\nfrom partitioning.decorators import partitioning\n\n\n@partitioning([\n    {'type': 'list', 'column': 'tag'},\n    {'type': 'range_month', 'column': 'created'},\n])\nclass Message(models.Model):\n    text = models.TextField()\n    tag = models.CharField(max_length=255)\n    created = models.DateTimeField()\n\n```\n\n- Lastly setup partitioning:\n```bash\n$ python manage.py setup_partitioning app_name\n```\n\n## Available settings\n`type` - partition type, currently supported:\n- list\n- range_day\n- range_week\n- range_month\n- range_year\n\n`column` - column, used to determine which partition record belongs to.\n\n## Testing \n\nClone the repo:\n```bash\n$ git clone https://github.com/starnavi-team/django-postgresql-partitioning.git\n```\n\nInstall requirements.\n\n```bash\n$ pip install -r requirements.txt\n```\n\nUse [tox](http://tox.readthedocs.org/en/latest/) testing tool to run the tests against all supported versions of Python and Django. Install tox globally, and then simply run:\n\n```bash\n$ tox\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstarnavi-team%2Fdjango-postgresql-partitioning","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fstarnavi-team%2Fdjango-postgresql-partitioning","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fstarnavi-team%2Fdjango-postgresql-partitioning/lists"}