Python Client Side Prerequisites
In order to practically utilize the powerful features of client-side NCache, make sure to implement the prerequisites discussed below.
Note
NCache supports Python 3.7, 3.8, and 3.9 for its Python client.
Prerequisites
- Install either of the following Python packages in your application:
- Enterprise: ncache-client
- Professional: ncache-professional-client
- Import the following packages in your application:
- The cache must be running.
- To ensure the operation is fail safe, it is recommended to handle any potential exceptions within your application, as explained in Handling Failures.
- To handle any unseen exceptions, refer to the Troubleshooting section.
Feature Specific Namespaces
Aside from the namespaces employed in most features, you should add the following namespaces/packages/classes based on the feature/API you intend to use and whether or not they require them.
Note
Any feature not mentioned in the list below either does not work with the specified feature or only requires the general namespaces/packages/classes.
- For Tags, Named Tags, Locking, Expirations:
- For Cache Data Dependencies, e.g., KeyDependency, FileDependency, and Database Dependencies:
- For SQL Queries:
- For Data Structures:
- from ncache.client.datastructures import *
- from ncache.client.datastructures.DistributedDictionary import *
- from ncache.client.datastructures.DistributedHashSet import *
- from ncache.client.datastructures.DistributedList import *
- from ncache.client.datastructures.DistributedQueue import *
- from ncache.runtime.caching import *
- from ncache.runtime.dependencies import *
- from ncache.runtime.caching.events import *
- For Pub/Sub:
See Also
Create Cache
Connecting to Cache
Add Data to Cache
Client Side API Programming