{"id":15907958,"url":"https://github.com/alir3z4/django-base64field","last_synced_at":"2025-10-13T18:22:45.165Z","repository":{"id":7596307,"uuid":"8953140","full_name":"Alir3z4/django-base64field","owner":"Alir3z4","description":"A motherfucking django model field to bring base64 encoded key to models.","archived":false,"fork":false,"pushed_at":"2013-06-03T00:32:14.000Z","size":300,"stargazers_count":8,"open_issues_count":3,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-10-09T07:13:51.017Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://pypi.python.org/pypi/django-base64field","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Alir3z4.png","metadata":{"files":{"readme":"README.rst","changelog":"ChangeLog.rst","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2013-03-22T14:05:08.000Z","updated_at":"2021-07-22T20:10:40.000Z","dependencies_parsed_at":"2022-09-13T14:01:02.240Z","dependency_job_id":null,"html_url":"https://github.com/Alir3z4/django-base64field","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/Alir3z4/django-base64field","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alir3z4%2Fdjango-base64field","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alir3z4%2Fdjango-base64field/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alir3z4%2Fdjango-base64field/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alir3z4%2Fdjango-base64field/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Alir3z4","download_url":"https://codeload.github.com/Alir3z4/django-base64field/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Alir3z4%2Fdjango-base64field/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279016581,"owners_count":26085850,"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-10-13T02:00:06.723Z","response_time":61,"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-10-06T14:07:36.436Z","updated_at":"2025-10-13T18:22:45.149Z","avatar_url":"https://github.com/Alir3z4.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"==================\nDjango Base64Field\n==================\n\n.. image:: https://travis-ci.org/Alir3z4/django-base64field.png\n   :alt: travis-cli tests status for django-base64field\n   :target: https://travis-ci.org/Alir3z4/django-base64field\n\n.. contents:: Table of contents\n\nOverview\n--------\n\n- A motherfucking django model field to bring ``base64`` encoded key to models.\n- It uses ``base64`` from ``django.utils.baseconv`` for encoding.\n- Tested on Python2.7, Python3.3 .\n\nHow it works?\n--------------\n\n``Base64Field`` is useful where you need a base64 encoded value from\nmodel's Primary Key a.k.a PK which is available on every django\napplication model by default. Sine `base64` encoder works with\n`integer` value then PK should be also `integer`, Fortunately\nagain `PK` field is `integer` by nature.\n\nWhen a model gets saved, ``post_save`` signal will be emitted,\nThis is where a ``base64`` encoded key will be generated/encoded\nfrom model's ``PK``, Then model will gets **updated** not getting save again.\nthis operation happens just on the first time model gets saved.\nIn next time model gets saved or updated ``base64`` won't be generated.\n\nYou wanna know more about how ``django-base64field`` works? Then get da fuck\nout of ``README.rst`` and look inside the ``django_base64field.tests.py``.\n\nUsage\n-----\n\nHere is simple usage of ``Base64Field``\n::\n    \u003e\u003e\u003e from django.db import models\n    \u003e\u003e\u003e from django_base64field.fields import Base64Field\n    \u003e\u003e\u003e\n    \u003e\u003e\u003e class MyModelianto(models.Model):\n    \u003e\u003e\u003e     ek = Base64Field()\n    \u003e\u003e\u003e\n    \u003e\u003e\u003e modelia = MyModelianto.objects.create(pk=314159265358979323)\n    \u003e\u003e\u003e modelia.ek\n    \u003e\u003e\u003e u''\n    \u003e\u003e\u003e refreshed_modelia = MyModelianto.objects.get(pk=modelia.pk)\n    \u003e\u003e\u003e refreshed_modelia.ek\n    \u003e\u003e\u003e u'HS7Y_sdg3x'\n\nAs You can see ``ek`` in not available on returned instance\nfrom ``MyModelianto.objects.create()``, It will be available after retrieving\n``refreshed_modelia`` from database which is same record as ``modelia`` here.\n\nThis behavior can be easily controlled with implementing a simple helper\nmethod on ``MyModelianto``. You can find out more about this solution on\n``django_base64field.tests.py``, Which it doesn't require to retrieving \nthe instance from database after first creation just for getting ``ek` field.\n\nInstallation\n------------\n``django-base64field`` is available on pypi\n\nhttp://pypi.python.org/pypi/django-base64field\n\nSo easily install it by ``pip``\n::\n\n    $ pip install django-base64field\n\nOr by ``easy_install``\n::\n\n    $ easy_install django-base64field\n\nAnother way is by cloning ``django-base64field``'s\n`git repo \u003chttps://github.com/Alir3z4/django-base64field\u003e`_ ::\n\n    $ git clone git://github.com/Alir3z4/django-base64field.git\n\nThen install it by running\n::\n\n    $ python setup.py install\n\nOr I don't know, Install it directly from git.\n::\n\n    pip install git+https://github.com/Alir3z4/django-base64field.git#egg=django-base64field\n\n\nSome pkgs have no installation method, This is awefuckingsome that\n``django-base64field`` gives you many ways for installation.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falir3z4%2Fdjango-base64field","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falir3z4%2Fdjango-base64field","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falir3z4%2Fdjango-base64field/lists"}