semvec/pypi-packages huggingface dataset:
mongo-jsonschema 0.1.4
A CLI tool and library for reverse engineering a JSONSchema from a MongoDB database.
License: MIT
Requires Python: <4.0,>=3.8

# Mongo Schema

Reverse engineer JSONSchemas from a MongoDB database.

## Installation

`pip install mongo-jsonschema`

## Usage

### As CLI Tool

<pre>
usage: python -m mongo_jsonschema [-h] [-c COLLECTIONS] [-p PORT] [-s SAMPLE_SIZE] [-r {PRIMARY,PRIMARY_PREFERRED,SECONDARY,SECONDARY_PREFERRED,NEAREST}] [-d DESTINATION] [-e] host db

Generates JSONSchemas from MongoDB Collections by sampling documents from the collection.

positional arguments:
  host                  A MongoDB hostname or connection string.
  db                    The name of the database in which the collections reside.

optional arguments:
  -h, --help            show this help message and exit
  -c COLLECTIONS, --collections COLLECTIONS
                        A comma separated list of collections to generate schemas from. If blank, schemas will be generated for all collections.
  -p PORT, --port PORT  The port to use when connecting to the MongoDB server. Required if host is not a connectionstring.
  -s SAMPLE_SIZE, --sample_size SAMPLE_SIZE
                        A decimal representation of the percentage of total documents in the collection to sample when deriving the schema. Default is .33.
  -r {PRIMARY,PRIMARY_PREFERRED,SECONDARY,SECONDARY_PREFERRED,NEAREST}, --read_preference {PRIMARY,PRIMARY_PREFERRED,SECONDARY,SECONDARY_PREFERRED,NEAREST}
                        The read preference to use when querying the MongoDB database. Default is 'SECONDARY'.
  -d DESTINATION, --destination DESTINATION
                        The directory to output the generated schemas to. If none is specified, will be output to the current working directory.
  -e, --external_sorting
                        Enables external sorting, using the disk on the mongodb server, for aggregations that exceed the memory limit. If false, the aggregation fails due to an exceeded memory limit, the
                        schema will be skipped.
</pre>

### As A Library

```python
from mongo_jsonschema import SchemaGenerator

# Initialize with your mongodb hostname and port
schema_generator = SchemaGenerator('localhost', 27017)
# Or use a connection string
schema_generator = SchemaGenerator('mongodb+srv://username:password@localhost/mydatabase')

#Generate schema for a multiple collections
schemas = schema_generator.get_schemas(
    db='mydatabase', 
    collections=['foo','bar'],
    sample_percent=.05
)

# Generate schema for a single collection.
schema = schema_generator.get_schemas(
    db='dbname',
    collection='baz',
    sample_percent=.05
)
catch-me 0.3.0
🐍 Catch me if you can!🐰
License: MIT
Requires Python: <4.0,>=3.8
Keywords: tk, python, ui, game

# 🐍 Catch me if you can!🐰

![Catch me!](docs/Grab-me-if-you-can-2024-03-15-093930.png)

## Video Youtube
[![Catch me if you can!](https://img.youtube.com/vi/6lJdZd2swLQ/mqdefault.jpg)](https://youtu.be/6lJdZd2swLQ)
wq 2.1.0
A modular framework for mobile surveys and field data collection via offline-capable mobile web apps.
License: MIT
Requires Python: >=3.8

<p align="center">
  <a href="https://wq.io">
    <img src="https://wq.io/images/wq.svg" alt="wq">
  </a>
</p>

<p align="center">
  <a href="https://wq.io"><strong>wq</strong></a> is a modular framework for field data collection and surveys via offline-capable mobile web apps.
</p>

## Getting Started

wq can be installed via GitHub, Docker, PyPI, NPM, or a `<script>` tag via CDN.  See [the documentation](https://wq.io/overview/setup) for more information on getting started.


### Dev Container (recommended)

1. Go to <https://github.com/wq/wq-docker-template>
2. Select "Use this template" -> "Create a new repository"
3. Open the dev container via [GitHub Codespaces][codespaces] or [Docker Desktop][docker]

[codespaces]: https://wq.io/guides/setup-wq-with-github-codespaces
[docker]: https://wq.io/guides/setup-wq-with-docker-desktop

### Docker Base Image

```bash
docker run ghcr.io/wq/base:main
```

### Python

```bash
python3 -m venv venv
. venv/bin/activate
python -m pip install wq
wq create myproject
```

### Node

```bash
npm init @wq myproject
```

### CDN
```html
<script type="module">
    import wq from 'https://unpkg.com/wq';
    wq.init({});
</script>
```

## Features

wq is made up of the following submodules, which are maintained as separate packages.

 Module                    | Github              | PyPI             | npm       | Description
---------------------------|---------------------|------------------|-----------|---------
[![wq][wq.svg]][wq/wq]     | [wq/wq][gh/wq]      | [wq][py/wq]      | [wq]      | Top level package (specifies submodules as dependencies)
[![wq.app][a.svg]][wq/a]   | [wq/wq.app][gh/a]   | [wq.app][py/a]   | [@wq/app] | A JavaScript+Python library for building robust offline-capable HTML5 data entry apps.
[![wq.build][b.svg]][wq/b]  | [wq/wq.build][gh/b]  | [wq.build][py/b]  |           | wq command line interface.
[![wq.create][c.svg]][wq/c] | [wq/wq.create][gh/c] | [wq.create][py/c] |           | Project template and scaffolding tools.
[![wq.db][d.svg]][wq/d]    | [wq/wq.db][gh/d]    | [wq.db][py/d]    |           | Django REST framework extension with design patterns for CRUD APIs.

[wq.svg]: https://wq.io/images/icons/wq.svg
[a.svg]: https://wq.io/images/icons/wq.app.svg
[b.svg]: https://wq.io/images/icons/wq.build.svg
[c.svg]: https://wq.io/images/icons/wq.create.svg
[d.svg]: https://wq.io/images/icons/wq.db.svg

[wq/wq]: https://wq.io/
[wq/a]: https://wq.io/wq.app/
[wq/b]: https://wq.io/wq.build/
[wq/c]: https://wq.io/wq.create/
[wq/d]: https://wq.io/wq.db/

[py/wq]: https://pypi.org/project/wq
[py/a]: https://pypi.org/project/wq.app
[py/b]: https://pypi.org/project/wq.build
[py/c]: https://pypi.org/project/wq.create
[py/d]: https://pypi.org/project/wq.db

[gh/wq]: https://github.com/wq/wq
[gh/a]: https://github.com/wq/wq.app
[gh/b]: https://github.com/wq/wq.build
[gh/c]: https://github.com/wq/wq.create
[gh/d]: https://github.com/wq/wq.db

[wq]: https://npmjs.com/package/wq
[@wq/app]: https://npmjs.com/package/@wq/app