{"id":22136049,"url":"https://github.com/mahmoudimus/sqlalchemy-citext","last_synced_at":"2025-11-06T10:03:55.729Z","repository":{"id":2867047,"uuid":"3872319","full_name":"mahmoudimus/sqlalchemy-citext","owner":"mahmoudimus","description":"CITEXT type for SQLAlchemy","archived":false,"fork":false,"pushed_at":"2023-05-24T19:13:44.000Z","size":25,"stargazers_count":29,"open_issues_count":11,"forks_count":14,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-10-29T23:19:25.047Z","etag":null,"topics":["citext","python","sqlalchemy","sqlalchemy-orm"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/mahmoudimus.png","metadata":{"files":{"readme":"README.rst","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}},"created_at":"2012-03-30T01:16:46.000Z","updated_at":"2024-04-03T22:16:13.000Z","dependencies_parsed_at":"2023-07-05T18:49:40.664Z","dependency_job_id":null,"html_url":"https://github.com/mahmoudimus/sqlalchemy-citext","commit_stats":{"total_commits":27,"total_committers":11,"mean_commits":"2.4545454545454546","dds":0.5555555555555556,"last_synced_commit":"ac2215c2543958ecabcc172c495d132d4efd8d7a"},"previous_names":[],"tags_count":8,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahmoudimus%2Fsqlalchemy-citext","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahmoudimus%2Fsqlalchemy-citext/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahmoudimus%2Fsqlalchemy-citext/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mahmoudimus%2Fsqlalchemy-citext/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mahmoudimus","download_url":"https://codeload.github.com/mahmoudimus/sqlalchemy-citext/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227215009,"owners_count":17748961,"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":["citext","python","sqlalchemy","sqlalchemy-orm"],"created_at":"2024-12-01T19:18:38.262Z","updated_at":"2025-11-06T10:03:55.677Z","avatar_url":"https://github.com/mahmoudimus.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"sqlalchemy-citext\n=================\n\nCreates a SQLAlchemy user defined type to understand\n`PostgreSQL's CIText \u003chttp://www.postgresql.org/docs/9.1/static/citext.html\u003e`_\nextension.\n\nInstallation\n------------\n\nThis requires some kind of PostgreSQL compatible db-api driver already\ninstalled in order to work.\n\nMake sure you have something like ``psycopg2`` already installed.\n\n.. code-block:: console\n\n    pip install sqlalchemy-citext\n\nUsage\n-----\n\n.. code-block:: python\n\n    from sqlalchemy import create_engine, MetaData, Integer\n    from sqlalchemy.schema import Column, Table\n    import sqlalchemy.orm as orm\n\n    from citext import CIText\n\n\n    engine = create_engine('postgresql://localhost/test_db')\n    meta = MetaData()\n\n    test_table = Table('test', meta,\n        Column('id', Integer(), primary_key=True),\n        Column('txt', CIText()))\n\n    conn = engine.connect()\n\n    meta.bind = conn\n    meta.drop_all()\n    meta.create_all()\n\n    class TestObj(object):\n        def __init__(self, id_, txt):\n            self.id = id_\n            self.txt = txt\n\n        def __repr__(self):\n            return \"TestObj(%r, %r)\" % (self.id, self.txt)\n\n    orm.mapper(TestObj, test_table)\n    Session = orm.sessionmaker(bind=engine)\n    ses = Session()\n\n    to = TestObj(1, txt='FooFighter')\n    ses.add(to)\n    ses.commit()\n    row = ses.query(TestObj).filter(TestObj.txt == 'foofighter').all()\n    assert len(row) == 1\n    print row\n    ses.close()\n\n\nLicense\n-------\n\n``sqlalchemy-citext`` is an MIT/BSD dual-Licensed library.\n\n\nContribute\n----------\n\n- Check for open issues or open a fresh issue to start a discussion around a\n  feature idea or a bug.\n- Fork the repository on GitHub to start making your changes to the master\n  branch (or branch off of it).\n- Write a test which shows that the bug was fixed or that the feature\n  works as expected.\n- Send a pull request and bug the maintainer until it gets merged and\n  published.\n- Make sure to add yourself to the author's file in ``setup.py`` and the\n  ``Contributors`` section below :)\n\nContributors\n------------\n\n- `@mahmoudimus \u003chttps://github.com/mahmoudimus\u003e`_\n- `@vad \u003chttps://github.com/vad\u003e`_\n- `@dstufft \u003chttps://github.com/dstufft\u003e`_\n- `@brmzkw \u003chttps://github.com/brmzkw\u003e`_\n- `@graingert \u003chttps://github.com/graingert\u003e`_\n- `@cjmayo \u003chttps://github.com/cjmayo\u003e`_\n- `@libre-man \u003chttps://github.com/libre-man\u003e`_\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmahmoudimus%2Fsqlalchemy-citext","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmahmoudimus%2Fsqlalchemy-citext","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmahmoudimus%2Fsqlalchemy-citext/lists"}