{"id":26913,"library":"dqsegdb2","title":"dqsegdb2","description":"Simplified Python interface to the Detector Characterization (DQSEGDB) API. Currently at version 1.3.0, released with support for Python >=3.6. Maintenance is sporadic; no active development observed.","status":"maintenance","version":"1.3.0","language":"python","source_language":"en","source_url":"https://git.ligo.org/detchar/dqsegdb2","tags":["gravitational-waves","detector-characterization","dqsegdb"],"install":[{"cmd":"pip install dqsegdb2","lang":"bash","label":"PyPI"}],"dependencies":[{"reason":"HTTP requests to DQSEGDB API","package":"requests","optional":false}],"imports":[{"note":"Old library dqsegdb (v1) has a different API. dqsegdb2 is a separate package.","wrong":"import dqsegdb","symbol":"DQSegDB","correct":"from dqsegdb2 import DQSegDB"},{"note":"SegDB is the main query object.","symbol":"segdb","correct":"from dqsegdb2 import segdb"}],"quickstart":{"code":"import os\nfrom dqsegdb2 import DQSegDB\n\nclient = DQSegDB(base_url='https://segdb.example.com', token=os.environ.get('DQSEGDB_TOKEN', ''))\nflags = client.query_flags(ifo='H1', flag='H1_DMT_SCIENCE', start=1234567890, end=1234567990)\nfor flag in flags:\n    print(flag['name'], flag['start_time'], flag['end_time'])","lang":"python","description":"Initialize a DQSegDB client, query flags for a given IFO and time range."},"warnings":[{"fix":"Uninstall dqsegdb and install dqsegdb2. Update imports from dqsegdb to dqsegdb2.","message":"The old library `dqsegdb` is completely different. Installing `dqsegdb2` does not upgrade `dqsegdb`. You must change import paths.","severity":"gotcha","affected_versions":"all"},{"fix":"Use `token='your_token'` instead of `auth=('user','pass')`.","message":"The `DQSegDB` class requires an explicit `token` parameter; earlier versions accepted an `auth` tuple. As of 1.3.0, `auth` is deprecated.","severity":"breaking","affected_versions":">=1.2.0"},{"fix":"Use `client.query_active(ifo, flag, start, end)` or `client.query_inactive(ifo, flag, start, end)`.","message":"The `query_segments()` method is deprecated in favor of `query_active()` and `query_inactive()`.","severity":"deprecated","affected_versions":">=1.3.0"}],"env_vars":null,"last_verified":"2026-05-01T00:00:00.000Z","next_check":"2026-07-30T00:00:00.000Z","problems":[{"fix":"Verify installation: `pip show dqsegdb2`. Then use `from dqsegdb2 import DQSegDB`.","cause":"The library was incorrectly installed or the import path is wrong. Common mistake: using `dqsegdb` instead of `dqsegdb2`.","error":"ImportError: cannot import name 'DQSegDB' from 'dqsegdb2'"},{"fix":"Provide `token` instead: `DQSegDB(..., token='your_token')`. If you need credentials, upgrade your code to obtain a token.","cause":"The `auth` parameter was removed in version 1.2.0.","error":"TypeError: __init__() got an unexpected keyword argument 'auth'"}],"ecosystem":"pypi","meta_description":null,"install_score":null,"install_tag":null,"quickstart_score":null,"quickstart_tag":null}