Skip to main content

Python stubs for Motor, a Non-Blocking MongoDB driver for Python's Tornado and AsyncIO based applications.

Project description

Motor-Types

Python stubs for Motor, a Non-Blocking MongoDB driver for Python's Tornado and AsyncIO based applications.

About

Stubs for Motor (version 3.0.0+) for substituting the missing type-hints. These stubs are meant to be used along with pycharm and mypy to facilitate static type-checking. Installing this package adds these .pyi files to libs/site-packages/motor. Currently, only the stubs for AsyncIO are supported. You can contribute to stubs for Tornado by opening a pull request for the same.

Note: This project is currently under development and is in no way affiliated with MongoDB. This is an unofficial stub package.

How to use?

You can either install from PyPI using pip or add files to your project directories manually.

Installing Using pip:

pip install motor-types

To install Motor (and Dnspython) alongside the package:

pip install motor-types[motor]

To add files to the project manually:

Use this command to clone the repository:

git clone "https://github.com/L0RD-ZER0/Motor-Types"

Afterwards, you can do either of the following to use stubs:

  • Copy the stubs manually to either libs/site-packages/motor or libs/site-packages/motor-stubs, ideally the latter.
  • Add these stubs manually to project directories.
    • For MyPy.
    • For PyCharm.
    • For other static type-checking tools, consider referring to their corresponding documentation regarding stubs.

Examples:

Auto-Complete Example

Without Stubs:

ACNS

With Stubs:

ACWS

Type-Checking Example

Without Stubs:

TCNS

With Stubs:

TCWS

Dependencies

This package uses following dependencies:

  • Poetry (For Packaging and Publishing)
  • PyMongo (For PyMongo related types)
  • Motor (For Referencing and for motor installation extra)
  • Dnspython (For motor installation extra)
  • Pre-Commit (For maintaining code quality)
  • Typing-Extensions (For using the latest typing features)

How to Contribute?

The simplest contribution you can make is by opening a GitHub Issue or by forking the repository and making a pull request on the GitHub Repository for the same. The changes can be as simple as improving the documentation or as big as completing any incomplete section of the typings.

Note: All issues and pull-requests are subjected to a preliminary inspection.

License

This repository is licensed under MIT License. The license can be found within the repository.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

motor_types-1.0.0b4.tar.gz (11.9 kB view details)

Uploaded Source

Built Distribution

motor_types-1.0.0b4-py3-none-any.whl (14.3 kB view details)

Uploaded Python 3

File details

Details for the file motor_types-1.0.0b4.tar.gz.

File metadata

  • Download URL: motor_types-1.0.0b4.tar.gz
  • Upload date:
  • Size: 11.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.10 Windows/10

File hashes

Hashes for motor_types-1.0.0b4.tar.gz
Algorithm Hash digest
SHA256 ece2ec5283dfef1a4d3d693db15a010b6c56fea0d46697184e36880935a9f940
MD5 867797d11dd7ef4b2eb9e4e989c4908f
BLAKE2b-256 bf3a1c8e980100bce164546761d4e1cb21856ca4986f51db7d815ca0bc401df1

See more details on using hashes here.

File details

Details for the file motor_types-1.0.0b4-py3-none-any.whl.

File metadata

  • Download URL: motor_types-1.0.0b4-py3-none-any.whl
  • Upload date:
  • Size: 14.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.7.1 CPython/3.10.10 Windows/10

File hashes

Hashes for motor_types-1.0.0b4-py3-none-any.whl
Algorithm Hash digest
SHA256 6dc37c87a78acdbd658abbc4426ba3d239c4a26485a12325c65439cb7a2e27bf
MD5 13faf8951fb1df2a27401c1febdf4a89
BLAKE2b-256 a86825bd2b82f5ecb7aac1be927ad1be529604b9731ed52bcf9535945f6c7329

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page