{"id":24773,"library":"types-pymssql","title":"types-pymssql","description":"Typing stubs for pymssql. Version 2.1.0 is a stub package for type checkers (mypy, pyright, etc.) to enable type hints for pymssql. Maintained by the typeshed project. Releases follow pymssql versioning.","status":"active","version":"2.1.0","language":"python","source_language":"en","source_url":"https://github.com/python/typeshed","tags":["stubs","type-hints","pymssql","typing"],"install":[{"cmd":"pip install types-pymssql","lang":"bash","label":"Install stubs"}],"dependencies":[],"imports":[{"note":"Do not import from the stub package. The stubs are automatically recognized by type checkers.","wrong":"from types_pymssql import ...","symbol":"pymssql","correct":"import pymssql"}],"quickstart":{"code":"import pymssql\nimport os\n\nconn = pymssql.connect(\n    server=os.environ.get('PYMSSQL_SERVER', ''),\n    user=os.environ.get('PYMSSQL_USER', ''),\n    password=os.environ.get('PYMSSQL_PASSWORD', ''),\n    database=os.environ.get('PYMSSQL_DB', '')\n)\ncursor = conn.cursor()\ncursor.execute('SELECT 1')\nrow = cursor.fetchone()\nprint(row)\ncursor.close()\nconn.close()","lang":"python","description":"Basic connection test using environment variables for credentials."},"warnings":[{"fix":"pip install pymssql","message":"types-pymssql provides type hints only. It does not replace the pymssql runtime package. You must install pymssql separately.","severity":"gotcha","affected_versions":"all"},{"fix":"Use `type: ignore` for new methods or contribute to typeshed.","message":"The stubs may lag behind pymssql releases. If pymssql adds new features, types-pymssql might not have type hints for them yet.","severity":"gotcha","affected_versions":"all"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"pip install pymssql","cause":"pymssql runtime library not installed.","error":"Traceback (most recent call last):\n  File \"<stdin>\", line 1, in <module>\nModuleNotFoundError: No module named 'pymssql'"},{"fix":"pip install types-pymssql","cause":"types-pymssql not installed for type checker.","error":"error: Cannot find implementation or library stub for module named 'pymssql' [import]"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}