semvec/pypi-packages huggingface dataset:
firestore-ci 2024.8.24
ORM for Firestore with cascade
License: MIT
Requires Python: >=3.5
Keywords: firestore google orm cascade

# Google Firestore ORM

This is yet another attempt to create an ORM for Google Firestore Database. 
This one is relatively simple with not too many options to customize.
In fact, the entire source code is in one file firestore-ci.py.

## Features
1. Provide multi-thread interface to simulate async interaction with firestore.
2. A truncate feature to only create fields with non-default values in firestore.
3. A cascade feature: This will be removed in future release.

## How to use for Google Cloud Firestore?
1. Install firestore-ci `pip install firestore-ci`
2. Save the GCP service-account JSON key in your project folder & give it a name. For e.g. `google-cloud.json`
3. Set the `GOOGLE_APPLICATION_CREDENTIALS` environment variable to the JSON file. 
For e.g., in Linux `export GOOGLE_APPLICATION_CREDENTIALS="google-cloud.json"`

## How to use with Firestore Emulator?
1. Install firestore-ci `pip install firestore-ci`
2. Start the Firestore Emulator.
3. Set up the environment variables `FIRESTORE_EMULATOR_HOST` with the ip address of the emulator and `FIRESTORE_EMULATOR_PROJECT_ID` with the project id that the emulator is using.


## How to use with Firestore Emulator?
1. Import `FirestoreDocument` from `firestore_ci` 
2. Make your object model using `FirestoreDocument` For e.g. `class User(FirestoreDocument)`
3. Override the `__init__()` method to add your fields
4. Outside the model, call the `init()` method of Firestore document. For e.g. `User.init()` 
5. Here is a sample `models.py` file
```python
from firestore_ci import FirestoreDocument

class User(FirestoreDocument):
    def __init__(self):
        super().__init__()
        self.name = str()
        self.email = str()

User.init()
```

## Test
The unit test cases for this package can be found [here](https://github.com/crazynayan/firestore-test). 
The test cases are self-explanatory and reviewing them will help understanding this package better.
quaternion-djs 1.1.0
A package for using quaternions
License: MIT
Requires Python: <4.0,>=3.10

# Quaternion

This package contains the code to enable calculations with Quaternions. Quaternion are in essence, 4-dimensional complex numbers that have applications in Mathematics, Physics and Computer Science. For more information check out (<https://en.wikipedia.org/wiki/Quaternion>)

This once was an area of study for myself during my undergraduate and I thought for a challenge I would make this package.

## Table of contents

- [Installation](#installation)
- [Documentation](#documentation)
- [Example](#example)
- [Contributing](#contributing)
- [License](#license)

## Installation

There are two sources for installation:

- GitHub, <https://github.com/DrJStrudwick/Quaternion>
- PyPi, ```pip install quaternion-djs```

As the package develops the changelog can be found [here](CHANGELOG.md)

## Documentation

Our documentation is hosted on ReadTheDocs and can be found here: <https://quaternion-djs.readthedocs.io/en/latest/>

## Example

The Quaternion class can be initialized easily by just supplying the corresponding values for the x, i, j, k components and then use in calculations as required. For the full list of methods and attributes available see the documentation.

```python
>>>from quaternion_djs import Quaternion
>>>quaternion_1 = Quaternion(1, 2, 0, 1.2)
```

## Contributing

If anyone wishes to contribute to improving this code base please see our [contributing guide](CONTRIBUTING.md) however please bear in mind our [code of conduct](CODE_OF_CONDUCT.md)

## License

This work is released under the MIT License which you can find [here](LICENSE)