Skip to main content

A lightweight server to facilitate the rendering and previewing of FITS files.

Project description

pyFitsServer

pyFitsServer is a lightweight server to facilitate the rendering and previewing of FITS (Flexible Image Transport System) files. It is designed to work in conjunction with the pyFitsVSC Visual Studio Code extension, providing backend services to support the frontend visualization capabilities.

Description

The pyFitsServer acts as a backend server for serving FITS file previews. It processes the FITS files and provides the necessary data and/or images to the pyFitsVSC extension. This server is general enough to serve FITS previews to other clients, too.

Installation

Install from Pypi

To install pyFitsServer from pypi:

  1. Make a virtual environment This will help to manage project dependencies.

    python -m venv .venv
    source .venv/bin/activate  # On Windows use `venv\Scripts\activate`
    
  2. Use pip to install the package

    pip install pyfitsserver
    
  3. Run the server

    python -m pyfitsserver
    

Build from Source

To install and run pyFitsServer from github, follow these steps:

  1. Clone the repository:

    git clone https://github.com/GillySpace27/pyFitsServer.git
    
  2. Navigate to the directory:

    cd pyFitsServer
    
  3. Create a virtual environment (optional but recommended):

    This will help to manage project dependencies.

    python -m venv .venv
    source .venv/bin/activate  # On Windows use `venv\Scripts\activate`
    
  4. Install the dependencies:

    pip install -r requirements.txt
    
  5. Run the server:

    python server.py
    

    or invoke the startup script

    python -m pyfitsserver
    
  6. Confirm the server is running properly by running tests (from the project root):

    pytest
    

If everything is set up correctly, the server should be running and you should see output indicating that it is ready to accept requests.

Usage

Once the pyFitsServer is running, it will be ready to interface with the pyFitsVSC extension for Visual Studio Code. The server will handle backend operations, such as rendering and processing the FITS files, and send the necessary data back to the pyFitsVSC extension for display. See the integration instructions below.

Contributing

Contributions are welcome! If you encounter any issues or have suggestions for improvements, please feel free to open an issue or submit a pull request.

License

This project is licensed under the MIT License. See the LICENSE file for details.

Integration with pyFitsVSC

pyFitsVSC is a VS Code extension designed to provide previews of FITS files seamlessly within the editor. Here’s how to use it in conjunction with pyFitsServer:

  1. Ensure the server is running by following the installation steps.

  2. Install the pyFitsVSC extension by following these steps:

    • To install from the precompiled .vsix file:
      • Check the binary files included in this build for a functional precompiled version of the .vsix file and download it.
      • Open VS Code.
      • Go to Extensions view (Ctrl+Shift+X).
      • Click the three-dot menu (...).
      • Select Install from VSIX....
      • Browse to and select the precompiled .vsix file.
    • To compile and package from source (if needed):
      1. Clone the repository:
        git clone https://github.com/GillySpace27/pyfitsvsc.git
        
      2. Navigate to the directory:
        cd pyfitsvsc
        
      3. Install VSCE if not already installed:
        npm install -g vsce
        
      4. Compile the TypeScript code:
        npm run compile
        
      5. Package the extension:
        vsce package
        
      6. Install the VSIX file:
        • Open VS Code.
        • Go to Extensions view (Ctrl+Shift+X).
        • Click the three-dot menu (...).
        • Select Install from VSIX....
        • Browse to and select the .vsix file created in the previous step.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pyfitsserver-0.0.29.tar.gz (75.6 kB view details)

Uploaded Source

Built Distribution

pyfitsserver-0.0.29-py3-none-any.whl (73.0 kB view details)

Uploaded Python 3

File details

Details for the file pyfitsserver-0.0.29.tar.gz.

File metadata

  • Download URL: pyfitsserver-0.0.29.tar.gz
  • Upload date:
  • Size: 75.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.12

File hashes

Hashes for pyfitsserver-0.0.29.tar.gz
Algorithm Hash digest
SHA256 aa48932eeda2f488c1195f09869c212a0dc607bd9b4d9e1d29a8c6355581f391
MD5 713bee9eb8eafefcd0784e7265ab7f48
BLAKE2b-256 d1dc37a915496ffc8b17fc08fcf0a8886d9cec55e8a066bd35f40454b426b3ab

See more details on using hashes here.

File details

Details for the file pyfitsserver-0.0.29-py3-none-any.whl.

File metadata

  • Download URL: pyfitsserver-0.0.29-py3-none-any.whl
  • Upload date:
  • Size: 73.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.12

File hashes

Hashes for pyfitsserver-0.0.29-py3-none-any.whl
Algorithm Hash digest
SHA256 b9b33fe6c39465a0d2e59f7e7eec4210d32cc6e0f66453ccfd10d2184b022717
MD5 bd781ff3fc155b76f33ee2f01a522414
BLAKE2b-256 4eaaba47f8fbb097af0608b4a9b241f8dc328bb0c39b40343006a4ad3cf72960

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page