semvec/pypi-packages huggingface dataset:
pysnc 1.2.1
Python SNC (REST) API
License: MIT
Requires Python: <4.0,>=3.9
Keywords: servicenow, snc

# ServiceNow Python API

**What:** 
PySnc is a python interface for the ServiceNow and the Table API. It is designed to mimic the familiar GlideRecord interface you know with pythonic support where applicable. 

**Why:** 
Spawned from the desire to interact with ServiceNow data in a familiar and consistent manner

## Install

```
pip install pysnc
```

If you also want to install the asyncio support, you can run:

```
pip install pysnc[asyncio]
```

## Quick Start

```python
from pysnc import ServiceNowClient

client = ServiceNowClient('https://dev0000.service-now.com', ('integration.user', password))

gr = client.GlideRecord('sys_user')
gr.add_query('user_name', 'admin')
gr.query()
for r in gr:
	print(r.sys_id)
```

## Documentation

Full documentation currently available at [https://servicenow.github.io/PySNC/](https://servicenow.github.io/PySNC/)

Or build them yourself:

```
cd docs && make html
```

## Development Notes

The following functions are not (yet?) supported:

* `choose_window(first_row, last_row, force_count=True)`  TODO
* `get_class_display_value()`
* `get_record_class_name()`
* `is_valid()` TODO
* `is_valid_record()`
* `new_record()`
* `_next()`
* `_query()`

The following will not be implemented:

* `get_attribute(field_name)` Not Applicable
* `get_ED()` Not Applicable
* `get_label()` Not Applicable
* `get_last_error_message()` Not Applicable
* `set_workflow(enable)` Not Possible
* `operation()` Not Applicable
* `set_abort_action()` Not Applicable
* `is_valid_field()` Not Possible
* `is_action_aborted()` Not Applicable

# Feature Wants and TODO

* GlideAggregate support (`/api/now/stats/{tableName}`)

And we want to:

* Improve documentation
aind-data-schema-models 5.3.0
Generated from aind-library-template
License: MIT
Requires Python: >=3.10

# aind-data-schema-models

[![License](https://img.shields.io/badge/license-MIT-brightgreen)](LICENSE)
![Code Style](https://img.shields.io/badge/code%20style-black-black)
[![semantic-release: angular](https://img.shields.io/badge/semantic--release-angular-e10079?logo=semantic-release)](https://github.com/semantic-release/semantic-release)
![Interrogate](https://img.shields.io/badge/interrogate-100.0%25-brightgreen)
![Coverage](https://img.shields.io/badge/coverage-100%25-brightgreen?logo=codecov)
![Python](https://img.shields.io/badge/python->=3.10-blue?logo=python)

## Installation

`aind-data-schema-models` is a dependency of `aind-data-schema`. You should not need to install it directly.

## Contributing

Install the dev dependencies:

```bash
pip install -e .[dev]
```

### How to add a new model class

#### tl;dr

Add new classes to the `_generators/models/*.csv` files or create new files containing `Enum`-derived classes directly in the src folder.

Run `./run_all.sh` in the top-level folder to rebuild models from their CSV files.

#### Details

The model class files, `brain_atlas.py` etc, are auto-generated. **You should never need to modify the class files directly.**

Instead, take a look at the `jinja2` templates in the folder `_generators/templates`. The filename of the template is used to pull the corresponding `.csv` file and populate the `data` DataFrame. In the template you can pull data from the various columns and use them to populate each of the fields in your class.

To re-build all the models, run the `run_all.sh` bash script in the root folder, which loops through the template files and runs them through the `generate_code` function.

There are a few special cases, e.g. if data are missing in columns they will show up as `float: nan`. See the `organizations.txt` template for examples of how to handle this.

#### Documentation

Internal registries need to be enumerated in the `aind-data-schema` file `src/aind_data_schema/utils/docs/registries_generator.py` in the variable `registries`. This list controls what classes will have documentation automatically generated and cross-referenced correctly.

If you add a new **external** registry, you need to write the documentation manually in the `aind-data-schema` file `docs/source/aind_data_schema_models/external.md`.