Saravanan666/pypi-org huggingface dataset:
Package: crudapi
CrudAPI: The easiest way to create your CRUD APIsCombining the power ofFastAPIandSQLModel, you'll only have to care about modeling your data and we'll take care of building up a RESTful API for it.fromtypingimportOptionalfromsqlmodelimportFieldfromsqlmodelimportSQLModelfromcrudapiimportCrudAPIfromcrudapi.modelsimportBaseModelclassBookUpdate(SQLModel,table=False):description:Optional[str]=Field(nullable=True)review:Optional[str]=Field(nullable=True)classBookCreate(BookUpdate):title:str=Field(nullable=False)classBook(BookCreate,BaseModel,table=True):__tablename__="books"crud=CrudAPI()crud.include_model(orm_model=Book,create_model=BookCreate,update_model=BookUpdate,)you'll get, out of the box, a workingcrudapiwith all these working REST endpoints:GET: /booksPOST: /booksGET: /books/<id>PATCH: /books/<id>PUT: /books/<id>DELETE: /books/<id>and because CrudAPI subclasses FastAPI you'll also get all the incredible features of this wonderful library, including automatic OpenAPI schema generation and a workingSwaggerUI:SamplesUnder the/samplesdirectory you'll find some CrudAPIs to help you understand the included features of this library.Pay special attention to the definitions onsamples/models.pyand how they relate to the automagically generated OpenAPI specification and APIs.We've also commited the.vscode/launch.jsonconfiguration file. With it, if you are a VSCode user you'll be able to launch some test & debugging servers.DevelopmentWe use Poetry for packaging and dependency management:poetry installpoetry shellWe use Pytest for testing:pytestYou can start a testing server running:uvicorn tests.server:app --reloadAcknowledgmentsThis wouldn't be possible without the great people working in the following open source projects. Eternal thanks to all of them.SQLAlchemy"The database toolkit for python."Starlette"The little ASGI framework that shines."pydantic"Data validation and settings management using Python type hinting."FastAPI"FastAPI framework, high performance, easy to learn, fast to code, ready for production."SQLModel"SQLModel, SQL databases in Python, designed for simplicity, compatibility, and robustness."
Package: crude-orm
Crude is a simple, lightweight ORM for Python which owes its ease-of-use to the
fact that it is adescriptiveORM rather than aprescriptiveone. What does
that mean? It means you can access your entire database programmatically with
just a few lines, without having to define any schemas or write any SQL
commands.Visithttps://crudepy.netfor official documentation and additional information.Copyright (c) 2022 Kristoffer A. Wright
Package: crudexml
crudexml -- Crude XML DOM moduleSimple and crude write-only XML DOM implementation.It does not read XML data, only produces XML text from the node objects provided here.Attributes are supported; namespaces are not.Finally, it is possible to get a "pretty" output using the OuterXMLPretty getter property._node is a base class with most of the functionality, with node being the "general" node type and tnode for text nodes.The intent is that these nodes have either node children or one tnode child.This keeps things simpler.Also, unlike Real DOM Implementations, the text node is a named node with text underneath it.Example use:from crudexml import node, tnoderoot = node('dvd', numtitles=7, parser="pydvdread %s"%1.0)root.AddChild( tnode('device', "/dev/sr0") )root.AddChild( tnode('name', "BLOOD_DIAMOND", fancy="Blood Diamond") )root.AddChild( tnode('vmg_id', "DVDVIDEO-VMG") )root.AddChild( tnode('provider_id', "WARNER_HOME_VIDEO") )titles = root.AddChild( node('titles') )Attributes are passed as named keywords to node() and tnode(), and can be accessed by using [...] on node nbjects.node.AddChild() returns the supplied node as with @titles above.The OuterXMLPretty for the above produces:<?xml version="1.0" ?><dvd numtitles="7" parser="pydvdread 1.0"><device>/dev/sr0</device><name fancy="Blood Diamond">BLOOD_DIAMOND</name><vmg_id>DVDVIDEO-VMG</vmg_id><provider_id>WARNER_HOME_VIDEO</provider_id><titles/></dvd>Additionally, the DOCTYPE is supported.from crudexml import node, tnode, dnode, docrootd = docroot()d.AddChild( dnode('foo', 'bar.dtd') )root = d.AddChild( node('dvd', numtitles=7, parser="pydvdread %s"%1.0) )root.AddChild( tnode('device', "/dev/sr0") )root.AddChild( tnode('name', "BLOOD_DIAMOND", fancy="Blood Diamond") )root.AddChild( tnode('vmg_id', "DVDVIDEO-VMG") )root.AddChild( tnode('provider_id', "WARNER_HOME_VIDEO") )titles = root.AddChild( node('titles') )And the XML:<?xml version="1.0" ?><!DOCTYPE fooSYSTEM 'bar.dtd'><dvd numtitles="7" parser="pydvdread 1.0"><device>/dev/sr0</device><name fancy="Blood Diamond">BLOOD_DIAMOND</name><vmg_id>DVDVIDEO-VMG</vmg_id><provider_id>WARNER_HOME_VIDEO</provider_id><titles/></dvd>The docroot() produces no XML for itself (i.e., OuterXML == InnerXML) and why the DOCTYPE and <dvd>...</dvd> are shown at the "root" level.
Package: crud-generator
crud_generatorThis will generate a crud operations (crud.py) for your Database tables.How to Use:Step 1:from crud_generator import generate_crudgenerate_crud(tablename, attributes) is the function which will create crud_tablename.py fileTable name and attributes/column name are the only two parameters to be passed.Eg: generate_crud("Employee","Name,Age,Employee_code,Salary")then this will automatically create py file.Step 2:functions created by the functions are#First:def create_conn():this function is an empty function where you can create your connections. You can choose any DB, import library accordingly.Following is the code which you will get.def create_conn():pass#Enter your connection code#Example: for postgresql#conn = psycopg2.connect(database = "testdb", user = "postgres", password = "pass123", host = "127.0.0.1", port = "5432")#then return conn#Second:def create_tablename(values):this function will perform insert operation in table.Here, you just need to pass values of the attributesEg: create_Employee("""'Alex',26,'EMP_2760',29000""") #Name,Age,Employee_code,SalaryYou can see the sql query in CLIEnsure to pass values as raw input.#Third:def read_Employee(condition="1=1"):this function will perform read operation in table.Here, if you don't pass any parameters it will return all records or you can pass any condition.Eg: read_Employee("Salary=2900 and Employee_code='EMP_2760'") # condition similary to that in where clause can be passed here.You can see the sql query in CLI#Fourth:def update_Employee(values,condition="1=1"):this function will perform update operation in table.Here, if you don't pass any condition it will perform update on all records or you can pass any condition.Here, you can pass values like "salary=30000", just like you pass in sql.Eg: update_Employee("Salary=30000","Name='Alex'") # condition similary to that in where clause can be passed here and values like     that in update statement.You can see the sql query in CLI#Fifth:def delete_Employee(condition="1=1"):this function will perform delete operation in table.Here, if you don't pass any parameters it will delete all records or you can pass any condition.Eg: delete_Employee("Salary=2900 and Employee_code='EMP_2760'") # condition similary to that in where clause can be passed here.You can see the sql query in CLI
Package: crudlfap
Welcome to CRUDLFA+ for Django 3.0: because Django is FUN !CRUDLFA+ stands for Create Read Update Delete List Form Autocomplete and more.This plugin for Django makes a rich user interface from Django models, built
with Material Components Web Ryzom Components, offering optionnal databinding
with channels support.Demo:last release:https://demo.crudlfap.ci.yourlabs.io/current master (might be down/broken etc):https://master.crudlfap.ci.yourlabs.io/TryThis should start the example project fromsrc/crudlfap_examplewhere each
documented example lives:# This installs the repo in ./src/crudlfap and in your python user packages, i run this from ~
pip install --user -e git+https://github.com/yourlabs/crudlfap.git#egg=crudlfap[example]
cd src/crudlfap

./manage.py migrate
./manage.py createsuperuser
./manage.py runserverFeaturesDRY into ModelRouter for all views of a Model,extensive CRUD views, actions, etcRich frontend interface out of the box, MDC/Ryzom/UnpolyResourcesDocumentationChatRoom graciously hosted bybyYourLabs Business ServiceonMattermostMailing list graciously hostedbyGoogleForSecurityissues, please contactyourlabs-security@googlegroups.comGit graciously hostedbyYourLabs Business ServicewithGitLabPackage graciously hostedbyPyPi,Continuous integration graciously hostedby YourLabs Business ServiceBrowser test graciously hosted bySauceLabs
Package: crudlib
crudlibOne API, More Database.Implement a set of interfaces to operate databases such as MySQL and MariaDB.
His goal is not to build a powerful ORM framework like SQLAlchemy,
just to satisfy the most basic CRUD operations.Quick StartfromcrudlibimportMySQLmy=MySQL()my.insert_one(tb="developers",doc={"name":"Zheng"})rows=my.query(tb="developers",condition={"age":">=18"})# Use SQL directlymy.execute("SELECT User FROM mysql.user;")InstallationpipinstallcrudlibFeaturesMySQLMariaDBLicenseThis project is licensed under the MIT License - see theLICENSEfile for more details.SponsorsJetBrains- Offer free Open Source license.
Package: cru-dse-utils
cru-dse-utilsThis is a package of useful functions developed by the Cru Data Sciences & Engineering team. The package includes the following files:general.py: Contains general data extraction related functions.auth.py: Contains functions for fetching credentials.bigquery.py: Contains functions for bigquery operations.gcs.py: Contains functions for Google Cloud Storage operations.dbt.py: Contains functions for dbt operations.InstallationTo install the package, run the following command:pip install cru-dse-utilsUsageTo use the package, import the desired functions from the appropriate subfolder. For example:from cru_dse_utils import get_requestRefer to the function docstring for instructions how to use the functionsContributingIf you would like to contribute to the package, please follow these steps:Fork the repository.Create a new branch for your changes.Make your changes and commit them with descriptive commit messages.Push your changes to your fork.Submit a pull request to the main repository.LicenseThis package is licensed under the MIT License. See the LICENSE file for more information.
Package: crudtoml
crudtomlPerform CRUD operations on TOML files.FeaturesStyle-preserving editsSupports indexing into arraysWrite back to input file with-i"Shell-compatible" output à lajqwith-rExamples$echo-e'[project]\nname = "crudtoml"'|teetest.toml[project]name="crudtoml"Create!$crudtomltest.tomlcreateprojectdob2023-05-23[project]name="crudtoml"dob=2023-06-23Read!$crudtomltest.tomlreadprojectname"crudtoml"Update!$crudtomltest.tomlupdateprojectname'"crudini"'[project]name="crudini"Delete!$crudtomltest.tomldeleteprojectname[project]
Package: cruet
CruetCruet is a simple toolkit for building microservices with flask. It works with both, function based and class based views.It is built on top of:flaskmarshmallowwebargsExamplefromflaskimportFlaskfrommarshmallowimportfieldsfromcruetimportCruet,use_args,ApiError,ApiResponseapp=Flask(__name__)cruet=Cruet(app)@app.route('/')@use_args({'name':fields.Str(required=True)})defindex(args):iflen(args['name'])<3:raiseApiError('Name has to be at least 3 characters',400)returnApiResponse({'msg':'Hello '+args['name']})if__name__=='__main__':app.run()# curl http://localhost:5000/?name='World'# {"data": {"msg": "Hello World"}}InstallationCruet is available from PyPipip install cruetResponseCruet provides theApiResponseclass for building json responses that are formatted consistently across all endpoints.Error HandlingCruet provides theApiErrorexception class for raising an exception and returning a formatted json response with the error message.Input ValidationCruet uses the excellentwebargslibrary for validating HTTP requests. It integrates the library in a very transparent way, which doesn't change the way webargs is being used and theirdocumentationshould be used as the reference.
Cruet only adds its own error handling to webargs and provides convenient decorators for different HTTP request input types.For general use, theuse_argsanduse_kwargsdecorators can be used. The example above usesuse_argsto check for a parameter calledname. The webargs library uses the concept oflocationsto define where it should look for the HTTP request data.
Cruet provides a few convenient decorators for the most common locations.QueryThequerydecorator looks for the data as part of the arguments in the URL query string.fromcruetimportquery@app.route('/')@query({'name':fields.Str(required=True)})defindex(args):iflen(args['name'])<3:raiseApiError('Name has to be at least 3 characters',400)returnApiResponse({'msg':'Hello '+args["name"]})# curl http://localhost:5000/?name='World'# {"data": {"msg": "Hello World"}}BodyThebodydecorator looks for json formatted data in the request body.fromcruetimportbody@app.route('/',methods=['POST'])@body({'name':fields.Str(required=True)})defindex(args):iflen(args['name'])<3:raiseApiError('Name has to be at least 3 characters',400)returnApiResponse({'msg':'Hello '+args["name"]})# curl -d '{"name":"World"}' -H "Content-Type: application/json" -X POST http://localhost:5000# {"data": {"msg": "Hello World"}}FormTheformdecorator looks for form-urlencoded data.fromcruetimportform@app.route('/',methods=['POST'])@form({'name':fields.Str(required=True)})defindex(args):iflen(args['name'])<3:raiseApiError('Name has to be at least 3 characters',400)returnApiResponse({'msg':'Hello '+args["name"]})# curl -d "name=World" -X POST http://localhost:5000# {"data": {"msg": "Hello World"}}
Package: cruft-helloworld
cruft_helloworldCruft Python Hello-WorldRequirementsPython 3.7.3 or newerpoetry1.1 or newerInstallationpipinstallcruft_helloworldDevelopmentThis project usespoetryfor packaging and
managing all dependencies andpre-committo runflake8,isort,mypyandblack.Clone this repository and runpoetryinstall
poetryrunpre-commitinstallto create a virtual environment containing all dependencies.
Afterwards, You can run the test suite usingpoetryrunpytestThis repository follows theConventional Commitsstyle.Pycharm debuggingDebuggers and PyCharmCoverage does not play well with other tracers simultaneously running.
This manifests itself in behaviour that PyCharm might not hit a breakpoint no matter what the user does.Cookiecutter templateThis project was created usingcruftand thecookiecutter-pyprojecttemplate.
In order to update this repository to the latest template version runcruftupdatein the root of this repository.
Package: cruiz
cruizConan recipe user interfaceWritten by Mark Final, (c) 2020-2022.DocumentationSee the documentation atRead The Docs.PrerequisitesIntel x86_64 platforms:Windows 10+Linux (CentOS 7.5+/Ubuntu 18+)macOS (10.13+)Apple Silicon platforms:macOS (11.0+)Python 3.7-3.10Conan 1.17.1+, but not 2.x (these are the versions tested)All other Python dependencies are installed when the package is installed.In order to use the dependency graph visualisation, an additional installation of GraphViz is required fromhttps://graphviz.org/download/. Assign the installed location to the preferences.Getting startedIf you have cloned this repository, you will need:A Python 3 environment. Make a virtual env if necessary.python3 -m venv <folder to be the env>Activate the virtual env with either:source <folder to be the env>/bin/activate(Linux/macOSX)<folder to be the env>\Scripts\activate.bat(Windows cmd)source <folder to be the env>\Scripts\activate(Windows bash)Ensure latest pip and wheel are being used.python -m pip install -U pip wheelInstall cruiz and its dependenciesFrom your local clone:pip install -r requirements.txtpip install --no-build-isolation -e .Run from any directoryFrom your Python environment shell,cruizorpython -m cruizStep 3 will need to be re-run when the Python dependencies, or the resource files used, change.PySide versionsPySide2 and PySide6 have been tested. PySide6 is the default, when runningcruiz. PySide2 is only available on Intel x86_64 platforms.On Linux, PySide 6 from PyPI requires modern libstdc++. If you see a launch error indicatingCXXABI_1.3.9then your distribution is likely too old.You can alter the default PySide versiont to use, in a number of ways:Use a different entry pointcruiz-pyside2orpython -m cruiz-pyside2Use an environment variableQT_API=pyside2 cruizLintingInstall linting dependencies withpip install -r requirements_dev.txt.cruiz usestoxto automate linting. Usetox -e lint.flake8is used for lint checks, specifically usingblackas the formatter.mypyis used for static type checking and validating type annotations.Python 3.10+ is highly recommended to run the linting steps.Making Python packagespython setup.py sdistfor a source distribution.pip wheel --no-deps .for a wheel.AcknowledgementsMany thanks toFoundryand its developers for support, inspiration, and testing in making cruiz.
Package: crumbcutter
CrumbCutterTemplate ONE gist file.Nothing else!pipinstallcrumbcutter-Ucrumbcutter <username>/<gist-name>Example Gistcrumbcutter.json{"project_name":"Crumbcutter Website Simple","author":"Anonymous"}index.html<!doctype html><html><head><metacharset="utf-8"><title>{{ crumbcutter.project_name }}</title></head><body><h1>{{ cookiecutter.project_name }}</h1><p>by {{ crumbcutter.author }}</p></body></html>Outputfoo@bar:~$crumbcutteroctocat/crumbcutter-index[1/2]project_name(Index):MyProject[2/2]author(Anonymous):Mefoo@bar:~$catindex.html
<!doctypehtml>
<html><head><metacharset="utf-8"><title>MyProject</title></head><body><h1>MyProject</h1><p>byMe</p></body>
</html>TIP: Use-xFor eXtremely Fast Renderingfoo@bar:~$crumbcutterjonathanagustin/crumbcutter-template-x
foo@bar:~$catindex.html
<!doctypehtml>
<html><head><metacharset="utf-8"><title>Index</title></head><body><h1>Index</h1><p>byAnonymous</p></body>
</html>Flags-o, --output-dir : Directory where file will render to. Defaults to current directory.
-x, --no-input   : eXtremely fast rendering. No user input. Use default values.
-v, --verbose    : Verbose output for debugging.Usecookiecutterto template more files or folders.
Package: crumb.py
Generate TTL based self expiring crumbs (token).Usage` pip install--upgradecrumb.py `` >>> from crumb import Crumb >>> >>> # generate crumb for user that expires in 30 seconds >>> c =Crumb('tim@tom.com',30,secret='!@#$')>>> c.generate() 830b60fe77b2 >>> >>> # key attribute also contains the generated crumb >>> print c.key 830b60fe77b2 >>> >>> # verify the generated crumb >>> c =Crumb('tim@tom.com',30,secret='!@#$',key='830b60fe77b2')>>> c.validate() True >>> >>> # try to verify again after 60 sec >>> c.validate() False `
Package: crumbs
DescriptionGeneralized all-in-one parameters module.This package provides a single interface to environment variables’,
configuration files’, and command line arguments’ provided values.  The
dictionary-like interface makes interacting with these, most of the time
disparate, resources much simpler.  It also allows parameters’ values to be set
in any of the three sources and selects an appropriate value when a parameter’s
value is specified in multiple sources.  This way the most expected value,
according to the normal prcedence—command line arguments then configuration
files then environment variables, is always returned.InstallationThis package is stored in PyPI and can be installed the standard way:pip install crumbsThe latest release available is:Using CrumbsUsage of this package is outlined in the documentation:pydoc crumbsDeveloping CrumbsIf you would prefer to clone this package directly from git or assist with
development, the URL ishttps://github.com/alunduil/crumbs.Crumbs is tested continuously by Travis-CI and running the tests is quite
simple:flake8
nosetestsThe current status of the build is:AuthorsAlex Brandt <alunduil@alunduil.com>Greg Swift <gregswift@gmail.com>Known IssuesKnown issues can be found in the github issue list athttps://github.com/alunduil/crumbs/issues.TroubleshootingIf you need to troubleshoot an issue or submit information in a bug report, we
recommend obtaining the following pieces of information:output with debug logging turned on in your applicationany relevant stack traces
Package: crunchable
This package is a thin wrapper around thecrunchable.ioAPIExample usage:>>> from crunchable import Crunchable
>>> client = Crunchable(YOUR_API_KEY)
>>> request = client.request_multiple_choice(instruction="Is this image safe for kids?", choices=["Safe", "Not Safe!"], attachments_type="image", attachments=['http://i.dailymail.co.uk/i/pix/2015/09/30/20/2CD2A9C700000578-3255251-Tom_and_Jerry_take_note_this_is_how_a_cat_and_mouse_can_get_on_a-a-87_1443640290328.jpg'], min_choices=1, max_choices=1)
>>> response = client.wait_for_task(request['id'])
>>> print response['response']For more information, refer to the Crunchable.IO APIdocs
Package: crunch-cli
CrunchDAO CLICrunchDAO CLI is a Python library designed for the ADIA Lab Market Prediction Competition, offering convenient access to competition's data and enabling effortless submission. When utilized in the command-line interface (CLI), its goal is to deliver a user experience akin to GitHub, enabling you to seamlessly push the code from your local environment.InstallationUsepipto install thecrunch-cli.pipinstallcrunch-cli--upgradeUsageimportcrunchcrunch=crunch.load_notebook()# Getting the dataX_train,y_train,X_test=crunch.load_data()crunch.load_data()accept arguments forread_parquet.crunch.load_data(engine="fastparquet")Submit with Crunch CLIUsage:crunchpush[OPTIONS]Sendthenewsubmissionofyourcode.

Options:-m,--messageTEXTSpecifythechangeofyourcode.(likeacommitmessage)-e,--main-fileTEXTEntrypointofyourcode.[default:main.py]--model-directoryTEXTDirectorywhereyourmodelisstored.[default:resources]--helpShowthismessageandexit.Detecting the environmentDetecting whether you are running inside the runner or not, allows you to configure your program more precisely.importcrunchifcrunch.is_inside_runner:print("running inside the runner")else:print("running elsewhere")model.enable_debug()logger.set_level("TRACE")Competition LinksCrunchDAO TournamentADIA Lab Market Prediction CompetitionContributingPull requests are always welcome! If you find any issues or have suggestions for improvements, please feel free to submit a pull request or open an issue in the GitHub repository.LicenseMIT
Package: cruncher
CruncherCruncher is a simple but powerful command line tool that optimizes images for the web.InstallingInstall and update Cruncher usingpip.$ pip install cruncherIt is highly recommenced that you run Cruncher withvirualenv. This can abstract away the peculiarities of running Cruncher across multiple operating systems.Cruncher is built for Python 3.It is tested the last three minor versions of Python (currently 3.8 to 3.10).Basic UsageCruncher is run from the terminal. Simply specify the image or directory of images you wish to compress, and your preferred settings.Example:$ cruncher -i "C:\path_to_image\the_image.jpg" -q 75 -s 300 500 -o "C:\path_to_output_dir"In this example the following options are used.-iIs the path to the image you wish to compress.-qIs the output image quality.-sIs the output images dimensions (width, height).-oIs the output directory.Please read the documentation for more details about these options and the others that exist.DocumentationCruncher DocumentationInstallationCLI OptionsJSON ConfigurationICC Profile ConversionTroubleshootingContributors@danielmorellCopyright © 2019-2022Daniel Morell
Package: crunchflow
crunchflowThe Python crunchflow package is a toolbox for working with the CrunchFlow reactive transport model. It can be particularly useful for analyzing and plotting CrunchFlow model output.InstallationUse the package managerpipto install crunchflow.pipinstallcrunchflowUsageFull documentation can be foundhereContributingPull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.Please make sure to update tests as appropriate.LicenseGPL