Metadata-Version: 2.3
Name: sdssdb
Version: 1.0.0
Summary: SDSS product for database management
Keywords: astronomy,software,database
Author: José Sánchez-Gallego, Brian Cherinka
Author-email: José Sánchez-Gallego <gallegoj@uw.edu>, Brian Cherinka <bcherinka@stsci.edu>
License: BSD 3-Clause License
Requires-Dist: pgpasslib>=1.1.0
Requires-Dist: psycopg2-binary>=2.9.11
Requires-Dist: peewee>=3.17.6
Requires-Dist: sqlalchemy>=2.0.0
Requires-Dist: sdsstools>=1.9.7
Requires-Dist: numpy>=1.18.2
Requires-Dist: six>=1.12.0
Requires-Dist: progressbar2>=3.46.1 ; extra == 'extras'
Requires-Dist: pydot>=1.4.1 ; extra == 'extras'
Requires-Dist: astropy>=5.0.0 ; extra == 'extras'
Requires-Dist: pandas>=2.0.0 ; extra == 'extras'
Requires-Dist: inflect>=4.1.0 ; extra == 'extras'
Requires-Dist: h5py>=3.8.0 ; extra == 'extras'
Requires-Dist: psycopg[binary]>=3.2.13 ; extra == 'extras'
Requires-Python: >=3.9, <4.0
Project-URL: Homepage, https://github.com/sdss/sdssdb
Project-URL: Repository, https://github.com/sdss/sdssdb
Project-URL: Documentation, https://sdssdb.readthedocs.org
Provides-Extra: extras
Description-Content-Type: text/markdown

# sdssdb

![Versions](https://img.shields.io/badge/python->=3.9-blue)
[![Documentation Status](https://readthedocs.org/projects/sdssdb/badge/?version=latest)](https://sdssdb.readthedocs.io/en/latest/?badge=latest)
[![Test](https://github.com/sdss/sdssdb/actions/workflows/test.yml/badge.svg)](https://github.com/sdss/sdssdb/actions/workflows/test.yml)

[SDSS](https://sdss.org>) product for database management.

## Useful links

- GitHub: [https://github.com/sdss/sdssdb](https://github.com/sdss/sdssdb)
- Documentation: [https://sdssdb.readthedocs.org](https://sdssdb.readthedocs.org)
- Issues: [https://github.com/sdss/sdssdb/issues](https://github.com/sdss/sdssdb/issues)

## Installation

To install `sdssdb` for regular usage, from PyPi,

```bash
pip install sdssdb
```

### Developer Install

```bash
git clone https://github.com/sdss/sdssdb
cd sdssdb
uv sync --python 3.12 --locked
```

This only installs the dependencies needed to run the code. For development, you can install extra dependencies needed for building docs or running tests with the `--all-groups` keyword.
```
uv sync --all-groups --python=3.12 --locked
```

If you don't have `uv` installed, you can install directly with pip:
```
git clone https://github.com/sdss/sdssdb
cd sdssdb
pip install -e .
```

### Building Sphinx Docs locally

Within the `sdssdb` directory, run
```
sdss docs.build
```
To have the docs autobuild and watch for changes, use `nox`.  To build and run the local docs server, run
```
nox
```
This will start a local docs server on a random port. You should see something like,
```
[sphinx-autobuild] Serving on http://127.0.0.1:54429
[sphinx-autobuild] Waiting to detect changes...
```
It should open the site automatically in a new browser window.  If `127.0.0.1:[port]` fails to load, try `localhost:[port]`.


## How to use

```python

    >>> from sdssdb.peewee.sdss5db import catalogdb
    >>> targets = catalogdb.GaiaDR2Source.select().where(catalogdb.GaiaDR2Source.phot_g_mean_mag < 15)
```
