Saravanan666/pypi-org huggingface dataset:
Package: fastapix-py
FastAPIXFastAPIX 为 FastAPI 提供的基于 SQLAlchemy ORM 快速构建数据库操作的插件.V1.0 后，将去除对pydantic v1的兼容安装pip3installfastapix-pyfastapifromfastapiimportFastAPIapp=FastAPI()离线挂载 openapifromfastapiximportofflineoffline.register_offline_openapi(app)修改异常返回结果fromfastapiximporthandlershandlers.register_exception_handlers(app)ORM模型fromuuidimportUUID,uuid4fromdatetimeimportdatetimefromtypingimportAnnotatedfrompydantic.functional_serializersimportPlainSerializerfromfastapix.crudimportSQLModel,Fieldfromfastapix.common.serializerimportconvert_datetime_to_chinese# 自定义类型序列化函数  pydantic V2+# from fastapix.crud.mixins import CreateTimeMixin 默认以采用 `DATETIME` 序列化# pydantic V2+DATETIME=Annotated[datetime,PlainSerializer(convert_datetime_to_chinese)]# 继承 SQLModelclassCategory(SQLModel,table=True):id:UUID=Field(default_factory=uuid4,primary_key=True,nullable=False,create=False,update=False)name:str=Field(...,title='名称',max_length=100,index=True,nullable=False,unique=True,update=False)create_time:DATETIME=Field(default_factory=datetime.now,title="Create Time",create=False,update=False)#DATETIMETIMESTAMP已内置于fastapix.crud.mixins, 如需其他自定义序列化方式，根据 pydantic 版本，采用不同方式定义创建连接AsyncDatabasefromsqlalchemy.ext.asyncioimportAsyncEngine,create_async_enginedatabase_url='sqlite+aiosqlite:///test.db'engine:AsyncEngine=create_async_engine(database_url)Databasefromsqlalchemy.engineimportcreate_engine,Enginedatabase_url='sqlite+aiosqlite:///test.db'engine:Engine=create_engine(database_url)注册fromfastapix.crudimportSQLAlchemyCrud,EngineDatabasedatabase=EngineDatabase(engine)cate_router=SQLAlchemyCrud(Category,database).router_manager()# 挂载中间件app.add_middleware(database.asgi_middleware)# 挂载路由app.include_router(cate_router.create_object_router())app.include_router(cate_router.read_object_router())app.include_router(cate_router.update_object_router())app.include_router(cate_router.delete_object_router())OpenAPI Docshttp://localhost:8000/docs
Package: fastapi-xray
FastAPI X-ray 🔥This TUI is designed to streamline the debugging process by providing a comprehensive view of request/response data and tracking all executed SQL queries. This tool empowers developers to effectively diagnose and resolve issues related to database interactions.Key Features:Request/Response Data Debugging: Gain deep insights into the data exchanged between client applications and the server. Easily identify and analyze the content and structure of both incoming requests and outgoing responses.SQL Query Tracking: Track every SQL query executed during the application runtime. Monitor query performance, detect bottlenecks, and optimize database interactions for enhanced efficiency.ScreenshotsInstallationInstall this package from pypi using this command.pip install fastapi-xrayUsageIt is very easy to use. Call thestart_xrayfunction to start intercepting all the request and response.from fastapi import FastAPI
from sqlalchemy import create_engine

from fastapi_xray import start_xray

# create SQLAlchemy engine
engine = create_engine("sqlite:///app.db")

app = FastAPI()

# Pass the instance of app and sql engine to the function.
# Passing the sql engine instance is optional
# if you are not using any database.
# NOTE: Not recommended to use it in the production.

if os.environ["DEBUG"]:
    start_xray(app, engine)Start the CLI to see the incoming requests in the terminal. Use this command to start the terminal interface.fastapi_xray # starts the xray server at 8989 portUse the--helpcommand to see all the configurable options.
Package: fastapi-yaml
OverviewHandle YAML requests with FastAPI.
The package will do the best effort to convert the YAML request to JSON.
All files that are uploaded as multipart/form-data will be concatenated and converted to JSON if the headerhandle-as-yamlis set to true.Installationpipinstallfastapi-yamlUsageFastAPI Code:fromfastapiimportFastAPIfromfastapi_yamlimportYamlRoutefrompydanticimportBaseModelapp=FastAPI()app.router.route_class=YamlRouteclassPerson(BaseModel,extra='forbid'):name:strage:int@app.post("/person")defperson(person:Person):returnf"{person.name}is{person.age}years old"HTTP Request:curl--requestPOST\--urlhttp://localhost:8000/person\--header"content-type: application/x-yaml"\--data"name: John Doe\nage: 42"Testspoetryrunpytest--covfastapi_yamltests/Coverage---------- coverage: platform darwin, python 3.11.2-final-0 ----------
Name                       Stmts   Miss  Cover
----------------------------------------------
fastapi_yaml/__init__.py       1      0   100%
fastapi_yaml/main.py          20      0   100%
----------------------------------------------
TOTAL                         21      0   100%
Package: fastapp
FastAppHTTP Apps Made Easier with FastAppInstallationpipinstallfastappUsing Out the Example Serverpipinstallfastapp[example]fastappserve-debugfastapp.app.example:appUsing FastApp to build an appCreate a Python File with Endpoints, we'll call thismain.py:fromdatetimeimportdatetimefromfastapp.appimportapp@app.get("/hello")defcustom_endpoint()->dict:""""This is a Custom API Endpoint"""returndict(timestamp=datetime.now(),hello="world")Then, using theFastAppCLI we can serve this App:fastappserve-debugmain:app...or via docker:dockerrun--rm-it\--publish8080:8080\--volume${PWD}/main.py:/root/fastapp/main.py\juftin/fastapp:latest\serve-debugmain:appTest out our new endpoint:curl\--requestGET\--header"Content-Type: application/json"\http://localhost:8080/helloAlternatively, if we want to serve this app using Gunicorn, Nginx, and the UvicornWorker we can use
theservecommand:fastappservemain:appI prefer doing this within a docker container so you don't have to run Nginx on the host machine:dockerrun--rm-it\--publish8080:8080\--volume${PWD}/main.py:/root/fastapp/main.py\juftin/fastapp:latest\servemain:app
Package: fast-append-array
Fast Append ArrayA dataframe which allows access to columns by name and supports blazing fast append operations.Original repository:https://github.com/mariushelf/fast_append_arrayAuthor: Marius Helf
(helfsmarius@gmail.com)Changelog0.2.0improve speed ofappend_dict()by factor 5small improvements for element access and slicingsupport for different dtypesfrom_pandas()andfrom_dicts()functions0.1.0first releaseLicenseMIT -- seeLICENSE
Package: fasta-reader
Welcome to fasta-reader 👋Read and write FASTA file🏠Homepage⚡️ RequirementsPython >= 3.9Installpipinstallfasta-readerExamplesThe following example show that it can read a compressed file remotely seamlessly:fromfasta_readerimportread_fastaROOT="https://ftp.ncbi.nlm.nih.gov/genomes/all/GCF/009/858/895"REF="GCF_009858895.2_ASM985889v3"FILE=f"{ROOT}/{REF}/{REF}_genomic.fna.gz"foriteminread_fasta(FILE):print(item)We can also write a FASTA file in a compressed format directly:fromfasta_readerimportwrite_fastawithwrite_fasta("protein.faa.gz")asfile:file.write_item("P01013 GENE X PROTEIN","QIKDLLVSSSTDLDT...")👤 AuthorDanilo HortaShow your supportGive a ⭐️ if this project helped you!
Package: fast-arrow-auth
fast_arrow_authA brief python library to handler API authentication with Robinhood.example# input username and password. Or, alternatively, pull from a config file,# see https://github.com/westonplatter/fast_arrow_auth/blob/master/examples/auth_generated_device_token.pyusername="my_username"password="my_device"client=Client(username=username,password=password)result=client.authenticate()user=User.fetch(client)print("Username ={}".format(user["username"]))installInstall the package from pypi,pip install fast_arrow_authdesign principlesfast_arrow_authis focusedonlyon authenticating with Robinhood's API.It's focused on these discrete operations,authenticate via username/password or username/password/mfawrite auth_token, etc to file for API clients to usedevelopmentInstallpipenv, and then run,pipenv install --devRun the test suite via,make testRun the test suite against a specific python version,pipenv run tox -e py36releasesAdding so I don't forget the next time I release a version,python setup.py sdist bdist_wheel
twine upload dist/*projects usingfast_arrow_authAdd projects here.
Package: fastash
FastASHFast Averaged Shifted Histograms.Density estimation which approximate a triangular Kernel Density Estimation (KDE.
Cython inside.InstallIf Cython is installed, the sources files in '.pyx' are used. Otherwise, the '.cpp' files are directly used.From PyPiSimply use the Pypi command (numpy is mandatorry to achieve the installation due to cython components) :pipinstallnumpy
pipinstallfastashFrom SourceSimply use the install command :makeinstallThis command is usefull during the developpement work.Build and deployTo build the package :makebuildThen, the procedure to deploy is the following (version number need to be incremented) :makedist
makedeployGetting Startedexemple usage in test/test_2d.pyhelp for packagingscript files are based on the packagehttps://github.com/cmcqueen/simplerandom.
Package: fastask
FastAskFastAsk is a Python package that allows you to ask questions and get brief answers quickly. It uses OpenAI's GPT-4 model or a local model to generate responses. You can use it as a command-line utility.InstallationFastAsk can be installed using pip:pipinstallfastaskUsageFastAsk can be used directly from the command line:>>>ask"list items in dir by date"*`ls-lt`:Thiscommandlistsallitemsinthecurrentdirectorysortedbymodificationtime,newestfirst.*`ls-ltr`:Thiscommandlistsallitemsinthecurrentdirectorysortedbymodificationtime,oldestfirst.More examples:>>>ask"find ip address"*`curlifconfig.me`:ThiscommandfetchesyourpublicIPaddress.
*`ipaddrshow`:ThiscommandshowsyourlocalIPaddress.>>>ask"convert video to audio using ffmpeg"*`ffmpeg-iinput.mp4-vn-ab320k-ar44100-youtput.mp3`:Thiscommandconvertsavideofile(input.mp4)toanaudiofile(output.mp3)usingffmpeg.Clearing History>>>ask--clear
FastAskHistoryCleared.ContributingContributions are welcome! Please submit a pull request or create an issue to discuss any changes you would like to make.LicenseFastAsk is licensed under the MIT License. See theLICENSEfile for more details.
Package: fastasplit
fastasplitSplit fasta filesJosh Tompkin, 2023Installation and usageInstall with pip:pip3installfastasplitUsage:fastasplit[-h][--version][-ddir][-pprefix][-e][-f]-nint[-s][-q][-v]fastaSpecify number of files with-n <int>, numer of sequences per file with-n <int> -s, or put every sequence into its own file with-e. Run with-hto print help.ExamplesSplit a fasta file named 'sequences.fa' into 20 fasta files with equal number of sequences in each:fastasplit-n20sequences.faSplit a fasta file named 'sequences.fa' into files with 10 sequences each:fastasplit-n10-ssequences.faSplit each sequence in 'sequences.fa' into a separate file:fastasplit-esequences.fa
Package: fasta-splitter
Fasta Sequences File Splitter(fasta-splitter)Command line tool to split one multiple sequences fasta file into individual sequences fasta files.Supported Operating SystemsDocumentationOfficial Documentation onReadTheDocs.Project InfoContinuous Integration (GitHub Actions)Code Coverage (Codecov)Vulnerabilities (Snyk)Maintainability (Code Climate)Documentation (Read the Docs)IssuesLanguagesLines of CodeCode SizeRepository SizeContributors CountLast Commit DateLatest TagGitHub Releases InfoTotal Downloads (All Releases)Release DateLatest ReleaseLatest Release Total DownloadsCommits Since Latest ReleasePyPI Releases InfoTotal DownloadsLatest ReleaseStatusPython VersionsLicense InfoLicense TypeLicense Scan (FOSSA)
Package: fastatocsv
fastatocsvfastatocsv is a python package that allows for manipulation of fasta files into csv formats.
You can access it at (https://pypi.org/project/fastatoscsvconverter/).InstallationUsepip install fastatocsvto install the package locally.Exampleimport fastatocsv 
fastatocsv.converter.convert("pathtoyourfasta.fasta","new.csv")
Package: fast-atomic
This is FAST, an acronym for FAST Atomic Spectroscopy from Theory.This software derives and solves optical Bloch equations efficiently. This can
be done for an arbitrary number of atomic states and radiation fields. The
equations are used primarily to produce theoretical spectra.A library of properties of alkali atoms (currently rubidium and cesium) is
included to produce physically accurate equations from first principles or
from tables of measured quantities.Symbolic derivations of the equations are also implemented.InstallingThis software requieres gfortran, numpy, matplotlib, lapack, sympy and scipy to
run. This is done in the following steps:1.-Install the Python dependencies by installing Anaconda, that is Continuum’s
Python distribution fromhttps://www.continuum.io/downloads2.-Install the non-Python dependencies.
In Ubuntu, the fortran dependencies (and git) can be installed with:$ sudo apt-get install gfortran liblapack-dev gitOther operative systems are not supported at the moment, but FAST should become
OS independent in the following releases (with Fortran being optional).3.-Install FAST.
To get the latest stable version of FAST use the command:$ pip install fast-atomicTo get the latest unstable version (this requires git):$ pip install git+git://github.com/oscarlazoarjona/fastTo upgrade to the latest stable version:$ pip install fast-atomic --upgradeTo upgrade to the latest unstable version (this requires git):$ pip install git+git://github.com/oscarlazoarjona/fast --upgradeTo uninstall:$ pip uninstall fast-atomicUsing FASTOnce this completed example jupyter notebooks can be downloaded fromhttps://github.com/oscarlazoarjona/fast-notebooksAnd they can be ran using$ jupyter notebookEnjoy!
Package: fastatomstruct
Fast calculation of structural parameters and autocorrelation functionsfastatomstructis a Python package (mostly written in Rust) that includes functions to calculate atomic structural quantities.
If possible, thread-based parallelization (usingrayon) is employed to speed up calculations and take advantage of multicore processors.DocumentationThe documentation can be found here.What can this package do?The package can currently calculate the following quantities:StructuralAtomic distancesCoordination numbersNearest neighboursRadial distribution functionStatic structure factorBond orientational parameter (Steinhardt et al.) and Bond Order Correlation parameterTetrahedral order parameterAngular-limited three-body correlation (ALTBC)Bond length ratio (BLR)DynamicalMean squared displacementNon-gaussian parameterFour-point correlation functionsAutocorrelation (with and without interpolation)Example usageThis example uses theAtomistic Simulation Environment, which can also be installed using pip (pip install ase) and is now a dependency offastatomstruct.fromase.buildimportbulkfromfastatomstructimportall_distances,coordination_numbers# Lithium in the BCC phase with the unit cell repeated# 10x10x10 timesatoms=bulk("Li","bcc",3.45).repeat((10,10,10))# Atomic distancesdists=all_distances(atoms)# Coordination numbers with a cutoff of 3 Acoordination=coordination_numbers(atoms,3)InstallationFrom PyPIfastatomstructcan be installed from thePython Package Index.Currently, only Linux and Windows with a Python version >= 3.8 are supported. In addition, your processor has to be x86-64 with AVX2 support.Most processors since 2015 should meet those criteria. If your system doesn't, you can still installfastatomstructfrom source (see next subsection).To run the installation, usepip install fastatomstructFrom sourceInstallingfastatomstructfrom source requiresPython >= 3.7pipa working Rust installation (1.56 and newer), including cargomaturin, a Python package that can e.g. be installed usingpip3 install --upgrade maturinTo build the Python wheel, runmaturin build --releaseThe resulting wheel will be located intarget/wheels/. You can install it usingpython3 -m pip install target/wheels/fastatomstruct-version.whlReplace "version" with your actual Python version.
The package can then be used in Python using e.g.from fastatomstruct import coordination_numbers.
Package: fastatools
Tools for working with fasta files.The fastatools package was developed by the United States Food
and Drug Administration, Center for Food Safety and Applied Nutrition.Free softwareDocumentation:https://fastatools.readthedocs.ioSource Code:https://github.com/CFSAN-Biostatistics/fastatoolsPyPI Distribution:https://pypi.python.org/pypi/fastatoolsFeaturesPrint the lengths of sequences.Determine if two fasta files are equivalent.Fix inconsistent line lengths and inconsistent lowercase.Generate a reverse complement of a fasta file.Extract a slice from a fasta file delimited by primers.Extract a range of positions from a fasta file.Citing fastatoolsTo cite fastatools, please reference the fastatools GitHub repository:https://github.com/CFSAN-Biostatistics/fastatoolsLicenseSee the LICENSE file included in the fastatools distribution.History1.2.0 (2018-12-10)First public release with docs and automated tests.1.1.0 (2018-10-25)Add range command to extract a range of positions from a fasta file.Add equiv command to check for equivalent fasta files.Add rewrite command to fix line length and uppercase/lowercase inconsistencies.1.0.0 (2018-09-21)Add length command to print the length of all the sequences in fasta files.0.1.0 (2017-11-30)Project started.
Package: fastaudio
FastaudioAn audio module for fastai v2. We want to help you build audio machine learning applications while minimizing the need for audio domain expertise. Currently under development.Quick StartGoogle Colab NotebookZachary Mueller's classInstallInstall using pip:pip install fastaudioIf you plan oncontributingto the library instead, you will need to do a editable install:# Optional step if using conda
conda create -n fastaudio python=3.7
conda activate fastaudio# Editable install
git clone https://github.com/fastaudio/fastaudio.git
cd fastaudio
pip install -e .[dev,testing]
pre-commit installTestingTo run the tests and verify everything is working, run the following command from thefastaudio/folder (only applicable after doing the editable install steps):pytestThis will run all of the test suit, reporting if there are any errors and also giving a code coverage report. Adittionally, there are extra checks thatpre-commitrun automatically every commit to verify the formatting and flake8 violations. If you want to run those manually, the command ispre-commit runContributing to the libraryWe are looking for contributors of all skill levels. If you don't have time to contribute, please at least reach out and give us some feedback on the library.Make sure that you have activated the environment that you usedpre-commit installin so that pre-commit knows where to run the git hooks.How to contributeCreate issues, write documentation, suggest/add features, submit PRs. We are open to anything. A good first step would be posting in thev2 audio threadintroducing yourself.NoteThis project has been set up using PyScaffold 3.2.3. For details and usage
information on PyScaffold seehttps://pyscaffold.org/.CitationIf you used this library in any research, please cite us.@misc{coultas_blum_scart_bracco_2020,
 title={Fastaudio},
 url={https://github.com/fastaudio/fastaudio},
 journal={GitHub},
 author={Coultas Blum, Harry A and Scart, Lucas G. and Bracco, Robert},
 year={2020},
 month={Aug}
}
Package: fast-aug
fast-aug - python bindingsfast-augis a library for fast text augmentation, available for both Rust and Python asfast-aug.It is designed with focus on performance and real-time usage (e.g. during training), while providing a wide range of text augmentation methods.Note:x25times faster thannlpaug!Installationfast-augis available onPyPI.pipinstallfast-augUsagefromfast_augimportCharsRandomSwapAugmentertext_data="Some text!"augmenter=CharsRandomSwapAugmenter(0.5,# probability of words selection0.5,# probability of characters selectionNone,# stopwords)assertaugmenter.augment(text_data)!=text_dataassertaugmenter.augment([text_data])!=[text_data]TBAPerformance ComparisonComparison of thefast-auglibrary with the other NLP augmentation libraries.fast-aug- this, Fast Augmentation library written in Rust, with Python bindingsnlpaug-nlpaug- The most popular NLP augmentation libraryfasttextaug-fasttextaug- re-write of somenlpaug's augmenters in Rust with Python bindingsauglynot included as"Our text augmentations use nlpaug as their backbone"augmentynot included as it is too slow (2-8 times slower thannlpaug)It is end-to-end comparison, including dataset loading, classes initialization and augmentation of all samples (one-by-one or provided as a list).See./benchmarks/compare_text.pyfor details of the comparison.All libs compared ontweeteval dataset- sentiment test set - 12k samples.Note: dataset text file size is 1.1Mb, it is included in the memory usage.Contributing and DevelopmentAny contribution is warmly welcomed!Please see the GitHub repository README atfast-aug.
Package: fast-auth-tools
Fast Auth Tools (for FastAPI)Add authentication to a FastApi app with a single functionInstallpipinstallfast-auth-toolsCreate User DBpython-mfast_auth.create_sqlite_db./my_user_db.sqlite3db path argument is optional and will default to .../site_packages/fast_auth/users.sqlite3ExampleimportosfromfastapiimportFastAPI,Dependsfromfast_authimportfast_auth,logged_in_user,Userfromfast_authimportsettingsasauth_settingsauth_settings.user_db_path="./my_user_db.sqlite3"# if the path was changedauth_settings.secret_key=os.getenv("FAST_AUTH_SECRET_KEY")auth_settings.cors_origins=["myapp.com","my-test-server.com"]app=FastAPI()fast_auth(app)@app.get("/secure/get/",dependencies=[Depends(logged_in_user)])asyncdefmust_be_logged_in():return{}@app.post("/secure/post/")asyncdefget_user_object(user:User=Depends(logged_in_user)):print(f"password hash:{user.password}")return{"data":f"{user.username}is already logged in"}Settingsnamedefaultdescriptioncors_origins["*"]allowed CORS originssecret_key"SoMeThInG_-sUp3Rs3kREt!!"the key used to encrypt JWTalgorithm"HS256"the alogrithm used to encrypt JWTaccess_token_expire_days5the maximum number of days JWT will be validuser_db_path".../site_packages/fast_auth/users.sqlite3"the path to the sqlite database that holds username/encrypted password informationlogin_url"login"path to POST endpoint accepting username/password form datatoken_refresh_url"refresh_token"path to GET endpoint that takes a valid JWT and returns a new JWT with maximum expiry
Package: fast-automl
Fast AutoMLMost autoML packages aim for exceptional performance but need to train for an exceptional amount of time. Fast-autoML aims for reasonable performance in a reasonable amount of time.Fast-autoML includes additional utilities, such as tools for comparing model performance by repeated cross-validation.Installation$ pip install fast-automlQuickstartfromfast_automl.automlimportAutoClassifierfromsklearn.datasetsimportload_digitsfromsklearn.model_selectionimportcross_val_score,train_test_splitX,y=load_digits(return_X_y=True)X_train,X_test,y_train,y_test=train_test_split(X,y,shuffle=True,stratify=y)clf=AutoClassifier(ensemble_method='stepwise',n_jobs=-1,verbose=True).fit(X_train,y_train)print('CV score:{:.4f}'.format(cross_val_score(clf.best_estimator_,X_train,y_train).mean()))print('Test score:{:.4f}'.format(clf.score(X_test,y_test)))This runs for about 6-7 minutes and typically achieves a test accuracy of
96-99% and ROC AUC above .999.fromfast_automl.automlimportAutoRegressorfromsklearn.datasetsimportload_diabetesfromsklearn.model_selectionimportcross_val_score,train_test_splitX,y=load_diabetes(return_X_y=True)X_train,X_test,y_train,y_test=train_test_split(X,y,shuffle=True)reg=AutoRegressor(n_jobs=-1,verbose=True).fit(X_train,y_train)print('CV score:{:.4f}'.format(cross_val_score(reg.best_estimator_,X_train,y_train).mean()))print('Test score:{:.4f}'.format(reg.score(X_test,y_test)))This runs for about 30 seconds and typically achieves a test R-squared of
.47-.53.Citation@software{bowen2021fast-automl,
  author = {Dillon Bowen},
  title = {Fast-AutoML},
  url = {https://dsbowen.github.io/fast-automl/},
  date = {2021-02-05},
}LicenseUsers must cite this package in any publications which use it.It is licensed with the MITLicense.AcknowledgmentsThis package and its documentation draw heavily onscikit-learn.