Package: tuxpy
TuxpyTuxpy is an API. It is developed to run processes located in Tuxdb with Python Programming Language.Install:$ pip install tuxpyAPITuxpy contains 3 modules. These are client, database and collection.clientImport Notation:import tuxpy.clientclass tuxpy.client.Client(host="127.0.0.1", port=6060)It's a constructor method that connects to the Tuxdb.parametersdescriptionhost: strThis parameter specifies which host address to connect to. Also host parameter must be the same value as tuxdb's server host value. It is set "127.0.0.1" by default.port: intthis parameter must be the same value as tuxdb's server port value. It is set 6060 by default.Client Class Member FunctionsgetDatabase(databaseName: str) -> tuxpy.database.DatabaseThis function returns a database object contained in Tuxdb. If there is no database associated with the databaseName parameter, the function creates a new database with the name specified by the databaseName parameter.parametersdescriptiondatabaseName: strThe name of the database to be accessed.getDatabaseNames() -> listThis function returns a list of all database names contained in the Tuxdb.databaseImport Notation:import tuxpy.databaseclass tuxpy.database.Database(client: tuxpy.client.Client, databaseName: str)This is a constructor method that returns a database object if there is database associated with the name specified by databaseName parameter. If there is no database, the constructor method creates a database with the name specified by databaseName parameter and then returns a database object.parametersdescriptionclient: tuxpy.client.ClientIt's a Client object connected to the Tuxdb.databaseName: strThe name of the database to be accessed.Database Class Member FunctionsgetCollection(collectionName: str) -> tuxpy.collection.CollectionThis function returns a collection object found in the currently used database. If there is no collection associated with the collectionName parameter, the function creates a new collection for the used database with the name specified by the collectionName parameter.parametersdescriptioncollectionName: strThe name of the collection in the used database.getCollectionNames() -> listThis function returns a list of all collections found in the currently used database.setDatabaseName(newDatabaseName: str) -> dictThis function sets the name of used database. Returns a dict that indicates whether the result of the function was successful.parametersdescriptionnewDatabaseName: strThe new database name instead of the current name of the used database.drop() -> dictThis function delete the used database from Tuxdb. Returns a dict that indicates whether the result of the function was successfulcollectionImport Notation:import tuxpy.collectionclass tuxpy.collection.Collection(client: tuxpy.client.Client, databaseName: str, collectionName: str)This constructor method returns a collection object found in the database. If there is no collection associated with the collectionName parameter, the function creates a new collection for the database with the name specified by the collectionName parameter.parametersdescriptionclient: tuxpy.client.ClientIt's a Client object connected to the TuxdbdatabaseName: strThe name of the database to be accessed.collectionName: strThe name of the collection in database to be accessed in the database.Client Class Member FunctionssetCollectionName(newCollectionName: str) -> dictThis function sets the name of used collection. Returns a dict that indicates whether the result of the function was successful.parametersdescriptionnewCollectionName: strThe new collection name instead of the current name of the used collection.getAllObjects() -> listReturns a list of all objects found in the used collection.findFromObjectId(objectId: str) -> dictThis function returns a dict of the object content found in the used collection.parametersdescriptionobjectId: strThe ID of object.findOne(query: dict) -> dictThis function returns a dict of an object associated the the query.parametersdescriptionquery: dictThe query to catch the objectfind(query: dict) -> listThis function returns a list of the objects associated with the query.parametersdescriptionquery: dictThe query to catch the objects.insert(data: dict) -> dictThis function creates a new object into used collection. Returns a dict that indicates whether the result of the function was successful.parametersdescriptiondata: dictContent of  new objectupdateFromObjectId(objectId: str, updateData: dict) -> dictThis function updates a object content associated with the objectId. Returns a dict that indicates whether the result of the function was successful.parametersdescriptionobjectId: strThe ID of object.updateData: dictIt contains the names of the elements to be changed and their new values.update(query: dict, updateData: dict) -> dictThis function updates the objects content associated with the query. Returns a dict that indicates whether the result of the function was successful.parametersdescriptionquery: dictThe query to catch the objects.updateData: dictIt contains the names of the elements to be changed and their new values.deleteFromObjectId(objectId: str) -> dictThis object deletes a object associated with the objectId. Returns a dict that indicates whether the result of the function was successful.parametersdescriptionobjectId: strThe ID of object.delete(query: dict) -> dictThis object deletes the objects associated with the query. Returns a dict that indicates whether the result of the function was successful.parametersdescriptionquery: dictThe query to catch the objects.drop() -> dictThis function deletes the used collection. Returns a dict that indicates whether the result of the function was successful.