semvec/pypi-packages huggingface dataset:
aiounittest 1.5.0
Test asyncio code more easily.
License: MIT
Keywords: asyncio, async, unittest, coroutine

aiounittest
===========

|image0|_ |image1|_

.. |image0| image:: https://api.travis-ci.com/kwarunek/aiounittest.svg?branch=master
.. _image0: https://travis-ci.com/kwarunek/aiounittest

.. |image1| image:: https://badge.fury.io/py/aiounittest.svg
.. _image1: https://badge.fury.io/py/aiounittest

Info
====

The `aiounittest` is a helper library to ease of your pain (and boilerplate), when writing a test of the asynchronous code (:code:`asyncio`). You can test:

* synchronous code (same as the :code:`unittest.TestCase`)
* asynchronous code, it supports syntax with :code:`async`/:code:`await` (Python 3.5+) and :code:`asyncio.coroutine`/:code:`yield from` (Python 3.4)


In the Python 3.8 (`release note <https://docs.python.org/3/whatsnew/3.8.html#unittest>`_) and newer consider to use the `unittest.IsolatedAsyncioTestCase <https://docs.python.org/3/library/unittest.html#unittest.IsolatedAsyncioTestCase>`_. Builtin :code:`unittest` module is now asyncio-featured.


Installation
============

Use pip:

::

    pip install aiounittest


Usage
=====

It's as simple as use of :code:`unittest.TestCase`. Full docs at http://aiounittest.readthedocs.io.

.. code-block:: python

    import asyncio
    import aiounittest


    async def add(x, y):
        await asyncio.sleep(0.1)
        return x + y

    class MyTest(aiounittest.AsyncTestCase):

        async def test_async_add(self):
            ret = await add(5, 6)
            self.assertEqual(ret, 11)

        # or 3.4 way
        @asyncio.coroutine
        def test_sleep(self):
            ret = yield from add(5, 6)
            self.assertEqual(ret, 11)

        # some regular test code
        def test_something(self):
            self.assertTrue(True)

Library provides some additional tooling:

* async_test_,
* AsyncMockIterator_ mocking for `async for`,
* futurized_ mock for coroutines.

.. _futurized: http://aiounittest.readthedocs.io/en/latest/futurized.html
.. _async_test: http://aiounittest.readthedocs.io/en/latest/async_test.html
.. _AsyncMockIterator: http://aiounittest.readthedocs.io/en/latest/asyncmockiterator.html

License
=======

MIT
pmole 0.2.0
Project Mole
License: MIT
Requires Python: >=3.8

# Project Mole

## Overview
Python package for code analysis and execution tracing. Provides CLI tools for analyzing Python code structure and dependencies.

## Features
- CLI interface for tracing Python file execution
- Import dependency resolution
- Module hierarchy visualization
- Verbose debugging mode
- PyPI package distribution

## Installation
```bash
# Install from PyPI
pip install pmole

# Install locally from source
pip install .
```

## Usage
```bash
# Trace a Python file's execution
pmole trace path/to/file.py

# Enable verbose output
pmole trace path/to/file.py -v
```

## License
MIT - See [LICENSE](LICENSE) for details.
langchain-jieba 0.1.1
An integration package connecting Jieba and LangChain
License: MIT
Requires Python: <4.0,>=3.9

# langchain-jieba
An integration package connecting Jieba and LangChain

# Jieba link extractor

## Description
langchain_community.graph_vectorstores support storing texts and their relationships in a vector database in the form of a knowledge graph.But the
recommended extractor such as `KeybertLinkExtractor` works better in an English environment,while it performs poorly in a Chinese environment.
`JiebaLinkExtractor` extract keywords from texts depend on `jieba.analyse` lib, which more suitable in a Chinese environment.

## Installation
%pip install langchain_jieba

## Usage

### extract from single text

```python
from langchain_jieba import JiebaLinkExtractor

extractor = JiebaLinkExtractor()
results = extractor.extract_one("小明硕士毕业于中国科学院计算所，后在日本京都大学深造")
print(f"results={results}")
```
results={Link(kind='kw', direction='bidir', tag='日本京都大学'), Link(kind='kw', direction='bidir', tag='计算所'), Link(kind='kw', direction='bidir', tag='小明')}


### extract from multiple texts

```python
from langchain_jieba import JiebaLinkExtractor

CONTENT1 = '小明硕士毕业于中国科学院计算所，后在日本京都大学深造'
CONTENT2 = '我来到北京清华大学'
extractor = JiebaLinkExtractor()
results = list(extractor.extract_many([CONTENT1, CONTENT2]))
print(f"results[0]={results[0]}")
print(f"results[1]={results[1]}")
```
results[0]={Link(kind='kw', direction='bidir', tag='日本京都大学'), Link(kind='kw', direction='bidir', tag='计算所'), Link(kind='kw', direction='bidir', tag='小明')}
results[1]={Link(kind='kw', direction='bidir', tag='清华大学'), Link(kind='kw', direction='bidir', tag='来到'), Link(kind='kw', direction='bidir', tag='北京')}