
    5jd
                        % S r SSKJr  SSKrSSKrSSKJr  SSKJr  SSK	J
r
Jr  SS	KJrJrJr  SS
KJr  SSKJr  SSKJrJr  SSKJr  SSKJr  SSKJr  SrS\S'         SS jr/ SQr g)zg
Implementations of storage backends to be used with
:class:`limits.strategies.RateLimiter` strategies
    )annotationsN   )SCHEMES)ConfigurationError)	TypeAliascast   )MovingWindowSupportSlidingWindowCounterSupportStorage)MemcachedStorage)MemoryStorage)MongoDBStorageMongoDBStorageBase)RedisStorage)RedisClusterStorage)RedisSentinelStoragez$Storage | limits.aio.storage.Storager   StorageTypesc                    [         R                  R                  U 5      R                  nU[        ;  a  [        SU  35      e[        [        [        U   " U 40 UD65      $ )a  
Factory function to get an instance of the storage class based
on the uri of the storage. In most cases using it should be sufficient
instead of directly instantiating the storage classes. for example::

    from limits.storage import storage_from_string

    memory = storage_from_string("memory://")
    memcached = storage_from_string("memcached://localhost:11211")
    redis = storage_from_string("redis://localhost:6379")

The same function can be used to construct the :ref:`storage:async storage`
variants, for example::

    from limits.storage import storage_from_string

    memory = storage_from_string("async+memory://")
    memcached = storage_from_string("async+memcached://localhost:11211")
    redis = storage_from_string("async+redis://localhost:6379")

:param storage_string: a string of the form ``scheme://host:port``.
 More details about supported storage schemes can be found at
 :ref:`storage:storage scheme`
:param options: all remaining keyword arguments are passed to the
 constructor matched by :paramref:`storage_string`.
:raises ConfigurationError: when the :attr:`storage_string` cannot be
 mapped to a registered :class:`limits.storage.Storage`
 or :class:`limits.aio.storage.Storage` instance.


zunknown storage scheme : )urllibparseurlparseschemer   r   r   r   )storage_stringoptionsr   s      V/root/lseg-credit/backend/venv/lib/python3.13/site-packages/limits/storage/__init__.pystorage_from_stringr      sV    D \\"">299FW #<^<L!MNNgfonHHII    )r   r   r   r   r
   r   r   r   r   r   r   )r   strr   zfloat | str | boolreturnr   )!__doc__
__future__r   r   limits_storage_schemer   errorsr   typingr   r   baser
   r   r   	memcachedr   memoryr   mongodbr   r   redisr   redis_clusterr   redis_sentinelr   r   __annotations__r   __all__ r   r   <module>r1      si   
 #   % ' $ K K ' ! 7  . 0@i @'J'J$6'J'JTr   